InstallerEmptySettingsTest.php 722 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace Drupal\FunctionalTests\Installer;
  3. /**
  4. * Tests the installer with empty settings file.
  5. *
  6. * @group Installer
  7. */
  8. class InstallerEmptySettingsTest extends InstallerTestBase {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. protected $defaultTheme = 'stark';
  13. /**
  14. * {@inheritdoc}
  15. */
  16. protected function prepareEnvironment() {
  17. parent::prepareEnvironment();
  18. // Create an empty settings.php file.
  19. $path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory;
  20. file_put_contents($path . '/settings.php', '');
  21. }
  22. /**
  23. * Verifies that installation succeeded.
  24. */
  25. public function testInstaller() {
  26. $this->assertUrl('user/1');
  27. $this->assertSession()->statusCodeEquals(200);
  28. }
  29. }