Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Warning no tests found in CodeIgiter\Tests\... #3788

Closed
willnode opened this issue Oct 19, 2020 · 0 comments · Fixed by #3789
Closed

Bug: Warning no tests found in CodeIgiter\Tests\... #3788

willnode opened this issue Oct 19, 2020 · 0 comments · Fixed by #3789
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@willnode
Copy link
Contributor

Describe the bug
I started to write tests in my app and CodeIgniter generate these warnings


1) Warning
No tests found in class "CodeIgniter\Test\CIDatabaseTestCase".

2) Warning
No tests found in class "CodeIgniter\Test\CIUnitTestCase".

I tried to manually configure my phpunit.xml but it didn't work. Easiest way to solve this according to internet is by set these class to abstract.

CodeIgniter 4 version
4.0.4

Expected behavior, and steps to reproduce if appropriate
Out of the box, should not generate these warning.

phpunit.xml that i tried:

<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/codeigniter4/framework/system/Test/bootstrap.php" ...>
	<testsuites>
		<testsuite name="app">
			<directory>./tests</directory>
			<exclude>
				./vendor/codeigniter4/framework/system/Test/CIDatabaseTestCase.php
			</exclude>
		</testsuite>
	</testsuites>

	<filter>
		<whitelist addUncoveredFilesFromWhitelist="false" processUncoveredFilesFromWhitelist="false">
			<directory suffix=".php">./app</directory>
			<exclude>
				<directory suffix=".php">./app/Views</directory>
				<file>./app/Config/Routes.php</file>
			</exclude>
		</whitelist>
	</filter>

	<logging>
		...
	</logging>

	<php>
		...
	</php>
</phpunit>

Context

  • OS: Windows 10
  • PHP version [e.g. 6.5.4]
@willnode willnode added the bug Verified issues on the current code behavior or pull requests that will fix them label Oct 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant