Open webther opened 5 years ago
I was wondering too.
I can run core
/usr/local/bin/php vendor/phpunit/phpunit/phpunit \
--configuration core \
--configuration core/phpunit.xml.dist \
Drupal\Tests\datetime\Unit\Plugin\migrate\field\DateFieldTest \
./core/modules/datetime/tests/src/Unit/Plugin/migrate/field/DateFieldTest.php
/usr/local/bin/php vendor/phpunit/phpunit/phpunit \
--configuration core \
--configuration core/phpunit.xml.dist \
--list-suites
gives (not important but still annoying) error about Devel/Drush for my system but should list all suites.
Fatal error: Trait 'Drush\TestTraits\DrushTestTrait' not found in /.../modules/contrib/devel/devel_generate/tests/src/Functional/DevelGenerateCommandsTest.php on line 26
Trying
vendor/phpunit/phpunit/phpunit --configuration core/phpunit.xml.dist vendor/drupal/console/Test/
vendor/phpunit/phpunit/phpunit --configuration vendor/drupal/console/phpunit.xml.dist
both gives
vendor/phpunit/phpunit/phpunit --configuration core/phpunit.xml.dist vendor/drupal/console/Test/
PHP Fatal error: Class 'Drupal\Console\Test\Command\GenerateCommandTest' not found in /...vendor/drupal/console/Test/Command/Generate/ServiceCommandTest.php on line 14
Problem/Motivation
There are some test files in the /vendor/drupal/console/Test directory. What is the correct way to test these testing cases?
How to reproduce
$ vendor/bin/phpunit vendor/drupal/console/Test/Generator/FormGeneratorTest.php
The result returns
PHP Fatal error: Class 'Drupal\Console\Test\Generator\GeneratorTest' not found in \vendor\drupal\console\Test\Generator\FormGeneratorTest.php on line 13