InstallerEmptySettingsTest.php 634 B

123456789101112131415161718192021222324252627282930
  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 function prepareEnvironment() {
  13. parent::prepareEnvironment();
  14. // Create an empty settings.php file.
  15. $path = $this->root . DIRECTORY_SEPARATOR . $this->siteDirectory;
  16. file_put_contents($path . '/settings.php', '');
  17. }
  18. /**
  19. * Verifies that installation succeeded.
  20. */
  21. public function testInstaller() {
  22. $this->assertUrl('user/1');
  23. $this->assertResponse(200);
  24. }
  25. }