Mercurial > hg > isophonics-drupal-site
annotate core/modules/simpletest/src/Tests/SkipRequiredModulesTest.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | af1871eacc83 |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Drupal\simpletest\Tests; |
Chris@0 | 4 |
Chris@0 | 5 use Drupal\simpletest\WebTestBase; |
Chris@0 | 6 |
Chris@0 | 7 /** |
Chris@0 | 8 * Tests if Simpletest-based tests are skipped based on module requirements. |
Chris@0 | 9 * |
Chris@0 | 10 * This test should always be skipped when TestDiscovery is used to discover it. |
Chris@0 | 11 * This means that if you specify this test to run-tests.sh with --class or |
Chris@0 | 12 * --file, this test will run and fail. |
Chris@0 | 13 * |
Chris@18 | 14 * Only WebTestBase tests are skipped by TestDiscovery. Other tests use the |
Chris@18 | 15 * PHPUnit @-require module annotation. |
Chris@18 | 16 * |
Chris@0 | 17 * @dependencies module_does_not_exist |
Chris@0 | 18 * |
Chris@0 | 19 * @group simpletest |
Chris@18 | 20 * @group WebTestBase |
Chris@0 | 21 * |
Chris@0 | 22 * @todo Change or remove this test when Simpletest-based tests are able to skip |
Chris@0 | 23 * themselves based on requirements. |
Chris@0 | 24 * @see https://www.drupal.org/node/1273478 |
Chris@0 | 25 */ |
Chris@0 | 26 class SkipRequiredModulesTest extends WebTestBase { |
Chris@0 | 27 |
Chris@0 | 28 public function testModuleNotFound() { |
Chris@0 | 29 $this->fail('This test should have been skipped during discovery.'); |
Chris@0 | 30 } |
Chris@0 | 31 |
Chris@0 | 32 } |