InstallerExistingConfigNoSystemSiteTest.php 1.23 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
<?php

namespace Drupal\FunctionalTests\Installer;

/**
 * Testing installing from config without system.site.
 *
 * @group Installer
 */
class InstallerExistingConfigNoSystemSiteTest extends InstallerExistingConfigTestBase {

  /**
   * {@inheritdoc}
   */
  protected function prepareEnvironment() {
    parent::prepareEnvironment();
    // File API functions are not available yet.
    unlink($this->siteDirectory . '/profiles/' . $this->profile . '/config/sync/system.site.yml');
  }

  /**
   * {@inheritdoc}
   */
  public function setUpSite() {
    return;
  }

  /**
   * Tests that profiles with no system.site do not work.
   */
  public function testConfigSync() {
    $this->htmlOutput(NULL);
    $this->assertTitle('Configuration validation | Drupal');
    $this->assertText('The configuration synchronization failed validation.');
    $this->assertText('This import does not contain system.site configuration, so has been rejected.');

    // Ensure there is no continuation button.
    $this->assertNoText('Save and continue');
    $this->assertNoFieldById('edit-submit');
  }

  /**
   * {@inheritdoc}
   */
  protected function getConfigTarball() {
    return __DIR__ . '/../../../fixtures/config_install/testing_config_install.tar.gz';
  }

}