You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Removed) Support for using class name as CLI argument
(Removed) Support for declaring more that one test case class in test source file
However, it's important to note that the example here does not implicate either of these:
The tests are executed based on file-names (not class-names).
There is only one test-class in each source file. The file-names are consistent with well-known conventions (supported by PSR-0 and earlier PEAR conventions).
The text was updated successfully, but these errors were encountered:
Summary
PHPUnit 9.x breaks support for loading classes that use
_
-based naming.For example (https://github.com/totten/phpunit-underscore-namespace), if you have a class
CRM_Utils_String
, then you would want a corresponding test-classCRM_Utils_StringTest
.As is typical in PSR-0 and earlier PEAR-based conventions, the underscores are mapped to folders. The example project has typical filenames like:
CRM/Utils/String.php
tests/phpunit/CRM/Utils/StringTest.php
Current behavior
phpunit9
phpunit9 path/to/test/folder/
phpunit9 path/to/test/file.php
Full output reproduced at https://github.com/totten/phpunit-underscore-namespace#running-with-phpunit-9
How to reproduce
Checkout the example https://github.com/totten/phpunit-underscore-namespace
Expected behavior
phpunit9
phpunit9 path/to/test/folder/
phpunit9 path/to/test/file.php
You can similar/expected output when running PHPUnit 8.x, eg https://github.com/totten/phpunit-underscore-namespace#running-with-phpunit-8
Discussion
The changelog (https://phpunit.de/announcements/phpunit-9.html) reports some known breaking changes:
However, it's important to note that the example here does not implicate either of these:
The text was updated successfully, but these errors were encountered: