InstallerProfileRequirementsTest.php 810 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace Drupal\FunctionalTests\Installer;
  3. /**
  4. * Tests that an install profile can implement hook_requirements().
  5. *
  6. * @group Installer
  7. */
  8. class InstallerProfileRequirementsTest extends InstallerTestBase {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. protected $defaultTheme = 'stark';
  13. /**
  14. * {@inheritdoc}
  15. */
  16. protected $profile = 'testing_requirements';
  17. /**
  18. * {@inheritdoc}
  19. */
  20. protected function setUpSettings() {
  21. // This form will never be reached.
  22. }
  23. /**
  24. * {@inheritdoc}
  25. */
  26. protected function setUpSite() {
  27. // This form will never be reached.
  28. }
  29. /**
  30. * Assert that the profile failed hook_requirements().
  31. */
  32. public function testHookRequirementsFailure() {
  33. $this->assertSession()->pageTextContains('Testing requirements failed requirements.');
  34. }
  35. }