The current test is set up to run only on the testbot that uses run-tests.sh.

Local usage of PHPUnit results in: No tests get executed

martin@martin-XPS-13-9370 /var/www/html/brown.localhost $ sudo -u www-data ./vendor/bin/phpunit -c ./web/core ./web/modules/contrib/openapi_rest --debug --printer="\Drupal\Tests\Listeners\HtmlOutputPrinter"
PHPUnit 7.5.20 by Sebastian Bergmann and contributors.



Time: 220 ms, Memory: 6.00 MB

No tests executed!

Comments

lolandese created an issue. See original summary.

lolandese’s picture

Status: Active » Needs review
StatusFileSize
new604 bytes

The filenames must end with "Test.php". This is what PHPUnit is looking for within directories.

Source: php - PHPUnit - 'No tests executed' when using configuration file - Stack Overflow

It's basically just a name change of both the file and class from RequestTestRest to RequestRestTest. I can open an issue but it seems it has a strong dependency on this one thus some hassle to merge the code changes later.

The test runs after applying the patch, albeit with errors. That looks to get solved in #3130334: Fix tests.

ERRORS!
Tests: 10, Assertions: 80, Errors: 9.
markdorison’s picture

Status: Needs review » Reviewed & tested by the community

This looks good to me. Just ran into a similar issue elsewhere.

phenaproxima’s picture

Status: Reviewed & tested by the community » Closed (duplicate)

Closing as a duplicate of #3433699: Automated Drupal 11 compatibility fixes for openapi_rest, which fixed this.