InstallerExistingConfigNoConfigTest.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. namespace Drupal\FunctionalTests\Installer;
  3. /**
  4. * Verifies that profiles invalid config can not be installed.
  5. *
  6. * @group Installer
  7. */
  8. class InstallerExistingConfigNoConfigTest extends InstallerExistingConfigTestBase {
  9. protected $profile = 'no_config_profile';
  10. /**
  11. * Final installer step: Configure site.
  12. */
  13. protected function setUpSite() {
  14. // There are errors therefore there is nothing to do here.
  15. return;
  16. }
  17. /**
  18. * {@inheritdoc}
  19. */
  20. protected function getConfigTarball() {
  21. return __DIR__ . '/../../../fixtures/config_install/testing_config_install_no_config.tar.gz';
  22. }
  23. /**
  24. * Tests that profiles with an empty config/sync directory do not work.
  25. */
  26. public function testConfigSync() {
  27. $this->assertTitle('Configuration validation | Drupal');
  28. $this->assertText('The configuration synchronization failed validation.');
  29. $this->assertText('This import is empty and if applied would delete all of your configuration, so has been rejected.');
  30. // Ensure there is no continuation button.
  31. $this->assertNoText('Save and continue');
  32. $this->assertNoFieldById('edit-submit');
  33. }
  34. }