BrowserMissingDependentModuleMethodTest.php 834 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Drupal\FunctionalTests;
  3. use Drupal\Tests\BrowserTestBase;
  4. /**
  5. * A fixture test class with requires annotation.
  6. *
  7. * This is a fixture class for
  8. * \Drupal\FunctionalTests\BrowserTestBaseTest::testMethodRequiresModule().
  9. *
  10. * This test class should not be discovered by run-tests.sh or phpunit.
  11. *
  12. * @group fixture
  13. */
  14. class BrowserMissingDependentModuleMethodTest extends BrowserTestBase {
  15. /**
  16. * This method should be skipped since it requires a module that is not found.
  17. *
  18. * @requires module module_does_not_exist
  19. */
  20. public function testRequiresModule() {
  21. $this->fail('Running test with missing required module.');
  22. }
  23. /**
  24. * Public access for checkRequirements() to avoid reflection.
  25. */
  26. public function publicCheckRequirements() {
  27. return parent::checkRequirements();
  28. }
  29. }