-
Notifications
You must be signed in to change notification settings - Fork 131
Description
Currently, php-test-standalone-plugins workflow (via the test-plugins command) is just checking to see if each standalone plugin causes a fatal when it is active in isolation from the other plugins:
performance/plugin-tests/tests/test-standalone.php
Lines 13 to 15 in 06d6ffe
public function test_plugin_does_not_fatal() { | |
return $this->assertTrue( true ); | |
} |
This seems like using the wrong tool, PHPUnit, for the job. Indeed, PHPStan flags this assertion as an error:
phpstan: Call to method PHPUnit\Framework\Assert::assertTrue() with true will always evaluate to true.
It seems better to not use PHPUnit here, but rather to use curl
to fetch the homepage and make sure it returns a 200 status code and includes </html>
in the response body. Even better would be to start using Playwright to do actual E2E tests.
I also think the test-plugins command should also be renamed to reduce confusion with test-php-plugins and test-php, for example, test-e2e.
Originally discussed in #1044 (comment) and #1044 (comment).