InstallerExistingConfigNoSystemSiteTest.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. namespace Drupal\FunctionalTests\Installer;
  3. /**
  4. * Testing installing from config without system.site.
  5. *
  6. * @group Installer
  7. */
  8. class InstallerExistingConfigNoSystemSiteTest extends InstallerExistingConfigTestBase {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. protected function prepareEnvironment() {
  13. parent::prepareEnvironment();
  14. // File API functions are not available yet.
  15. unlink($this->siteDirectory . '/profiles/' . $this->profile . '/config/sync/system.site.yml');
  16. }
  17. /**
  18. * {@inheritdoc}
  19. */
  20. public function setUpSite() {
  21. return;
  22. }
  23. /**
  24. * Tests that profiles with no system.site do not work.
  25. */
  26. public function testConfigSync() {
  27. $this->htmlOutput(NULL);
  28. $this->assertTitle('Configuration validation | Drupal');
  29. $this->assertText('The configuration synchronization failed validation.');
  30. $this->assertText('This import does not contain system.site configuration, so has been rejected.');
  31. // Ensure there is no continuation button.
  32. $this->assertNoText('Save and continue');
  33. $this->assertNoFieldById('edit-submit');
  34. }
  35. /**
  36. * {@inheritdoc}
  37. */
  38. protected function getConfigTarball() {
  39. return __DIR__ . '/../../../fixtures/config_install/testing_config_install.tar.gz';
  40. }
  41. }