KernelMissingDependentModuleTest.php 876 B

1234567891011121314151617181920212223242526272829303132333435
  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. * @requires module module_does_not_exist
  12. * @group fixture
  13. */
  14. class KernelMissingDependentModuleTest extends KernelTestBase {
  15. /**
  16. * Placeholder test method.
  17. *
  18. * Depending on configuration, PHPUnit might fail a test if it has no test
  19. * methods, so we must provide one. This method should never be executed.
  20. */
  21. public function testRequiresModule() {
  22. $this->fail('Running test with missing required module.');
  23. }
  24. /**
  25. * Public access for checkRequirements() to avoid reflection.
  26. */
  27. public function publicCheckRequirements() {
  28. return parent::checkRequirements();
  29. }
  30. }