Mercurial > hg > isophonics-drupal-site
annotate core/tests/fixtures/KernelMissingDependentModuleTest.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\KernelTests; |
Chris@0 | 4 |
Chris@0 | 5 /** |
Chris@0 | 6 * A fixture test class with requires annotation. |
Chris@0 | 7 * |
Chris@0 | 8 * This is a fixture class for |
Chris@0 | 9 * \Drupal\KernelTests\KernelTestBaseTest::testRequiresModule(). |
Chris@0 | 10 * |
Chris@0 | 11 * This test class should not be discovered by run-tests.sh or phpunit. |
Chris@0 | 12 * |
Chris@0 | 13 * @requires module module_does_not_exist |
Chris@0 | 14 * @group fixture |
Chris@0 | 15 */ |
Chris@0 | 16 class KernelMissingDependentModuleTest extends KernelTestBase { |
Chris@0 | 17 |
Chris@0 | 18 /** |
Chris@0 | 19 * Placeholder test method. |
Chris@0 | 20 * |
Chris@0 | 21 * Depending on configuration, PHPUnit might fail a test if it has no test |
Chris@0 | 22 * methods, so we must provide one. This method should never be executed. |
Chris@0 | 23 */ |
Chris@0 | 24 public function testRequiresModule() { |
Chris@0 | 25 $this->fail('Running test with missing required module.'); |
Chris@0 | 26 } |
Chris@0 | 27 |
Chris@0 | 28 /** |
Chris@0 | 29 * Public access for checkRequirements() to avoid reflection. |
Chris@0 | 30 */ |
Chris@0 | 31 public function publicCheckRequirements() { |
Chris@0 | 32 return parent::checkRequirements(); |
Chris@0 | 33 } |
Chris@0 | 34 |
Chris@0 | 35 } |