class InstallerExistingConfigNoConfigTest

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/FunctionalTests/Installer/InstallerExistingConfigNoConfigTest.php \Drupal\FunctionalTests\Installer\InstallerExistingConfigNoConfigTest

Verifies that profiles invalid config can not be installed.

@group Installer

Hierarchy

Expanded class hierarchy of InstallerExistingConfigNoConfigTest

File

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

Namespace

Drupal\FunctionalTests\Installer
View source
class InstallerExistingConfigNoConfigTest extends InstallerExistingConfigTestBase {
  
  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'stark';
  protected $profile = 'no_config_profile';
  
  /**
   * Final installer step: Configure site.
   */
  protected function setUpSite() {
    // There are errors therefore there is nothing to do here.
  }
  
  /**
   * {@inheritdoc}
   */
  protected function getConfigTarball() {
    return __DIR__ . '/../../../fixtures/config_install/testing_config_install_no_config.tar.gz';
  }
  
  /**
   * Tests that profiles with an empty config/sync directory do not work.
   */
  public function testConfigSync() {
    $this->assertSession()
      ->titleEquals('Configuration validation | Drupal');
    $this->assertSession()
      ->pageTextContains('The configuration synchronization failed validation.');
    $this->assertSession()
      ->pageTextContains('This import is empty and if applied would delete all of your configuration, so has been rejected.');
    // Ensure there is no continuation button.
    $this->assertSession()
      ->pageTextNotContains('Save and continue');
    $this->assertSession()
      ->buttonNotExists('edit-submit');
  }

}

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