class InstallerExistingConfigNoSystemSiteTest

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php \Drupal\FunctionalTests\Installer\InstallerExistingConfigNoSystemSiteTest
  2. 10 core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php \Drupal\FunctionalTests\Installer\InstallerExistingConfigNoSystemSiteTest
  3. 8.9.x core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php \Drupal\FunctionalTests\Installer\InstallerExistingConfigNoSystemSiteTest

Testing installing from config without system.site.

@group Installer

Hierarchy

Expanded class hierarchy of InstallerExistingConfigNoSystemSiteTest

File

core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoSystemSiteTest.php, line 10

Namespace

Drupal\FunctionalTests\Installer
View source
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() {
    // There are errors. Therefore, there is nothing to do here.
  }
  
  /**
   * Tests that profiles with no system.site do not work.
   */
  public function testConfigSync() {
    $this->htmlOutput(NULL);
    $this->assertSession()
      ->titleEquals('Configuration validation | Drupal');
    $this->assertSession()
      ->pageTextContains('The configuration synchronization failed validation.');
    $this->assertSession()
      ->pageTextContains('This import does not contain system.site configuration, so has been rejected.');
    // Ensure there is no continuation button.
    $this->assertSession()
      ->pageTextNotContains('Save and continue');
    $this->assertSession()
      ->buttonNotExists('edit-submit');
  }
  
  /**
   * {@inheritdoc}
   */
  protected function getConfigTarball() {
    return __DIR__ . '/../../../fixtures/config_install/testing_config_install.tar.gz';
  }

}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.