InstallerProfileRequirementsTest.php 741 B

1234567891011121314151617181920212223242526272829303132333435363738
  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 $profile = 'testing_requirements';
  13. /**
  14. * {@inheritdoc}
  15. */
  16. protected function setUpSettings() {
  17. // This form will never be reached.
  18. }
  19. /**
  20. * {@inheritdoc}
  21. */
  22. protected function setUpSite() {
  23. // This form will never be reached.
  24. }
  25. /**
  26. * Assert that the profile failed hook_requirements().
  27. */
  28. public function testHookRequirementsFailure() {
  29. $this->assertSession()->pageTextContains('Testing requirements failed requirements.');
  30. }
  31. }