It is sometimes useful to skip all tests from a specific file based on user conditions defined as php code. You can easily do this using the setUp function, in which makeTestSkipped also works.
protected function setUp() { if ($yourCustomCondition) { $this->markTestSkipped('all tests in this file are invactive for this server configuration!'); } }
$ yourCustomCondition can be passed through some method / property of a static class, a constant defined in the phpunit boot file, or even through a global variable - it's up to you.
Konrad Gałęzowski Feb 09 '16 at 9:44 2016-02-09 09:44
source share