KernelMissingDependentModuleMethodTest.php 782 B

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