After #697760: Replace getInfo() in tests with native phpDoc + annotations (following PHPUnit), the test script fails completely (at least for me) if any test in the installation (no matter whether it's set to run or not) doesn't have a phpDoc.
The following error output (repeated in a slightly changed format) is the only thing I get now when, e.g., trying to run Search API tests:

PHP Fatal error:  Uncaught exception 'LogicException' with message 'Missing phpDoc on Drupal\devel_generate\Tests\DevelGenerateManagerTest.' in …/core/modules/simpletest/src/TestDiscovery.php:396
Stack trace:
#0 …/core/modules/simpletest/src/TestDiscovery.php(308): Drupal\simpletest\TestDiscovery::parseTestClassSummary(Object(ReflectionClass))
#1 …/core/modules/simpletest/src/TestDiscovery.php(166): Drupal\simpletest\TestDiscovery::getTestInfo(Object(ReflectionClass))
#2 …/core/modules/simpletest/simpletest.module(483): Drupal\simpletest\TestDiscovery->getTestClasses(NULL)
#3 …/core/scripts/run-tests.sh(804): simpletest_test_get_all()
#4 …/core/scripts/run-tests.sh(70): simpletest_script_get_test_list() in …/core/modules/simpletest/src/TestDiscovery.php on line 396

I expect this will soon be fixed at least for the most popular modules, but I still think this should be more error-tolerant.

Comments

drunken monkey’s picture

Status: Active » Needs review
StatusFileSize
new790 bytes

The attached patch solves the problem for me and also makes sense to me. Reviews appreciated.

Also, since TestDiscovery::getTestClasses() doesn't specify @throws \LogicException, the current code there is wrong anyways. If we want to catch this in some other place, we have to add that doc tag (or remove it, and the throws, from TestDiscovery::getTestInfo()).

sun’s picture

Status: Needs review » Closed (duplicate)
Related issues: +#2302113: Testing: Missing phpDoc breaks Simpletest