InstallerExistingConfigNoConfigTest.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. /**
  10. * {@inheritdoc}
  11. */
  12. protected $defaultTheme = 'stark';
  13. protected $profile = 'no_config_profile';
  14. /**
  15. * Final installer step: Configure site.
  16. */
  17. protected function setUpSite() {
  18. // There are errors therefore there is nothing to do here.
  19. return;
  20. }
  21. /**
  22. * {@inheritdoc}
  23. */
  24. protected function getConfigTarball() {
  25. return __DIR__ . '/../../../fixtures/config_install/testing_config_install_no_config.tar.gz';
  26. }
  27. /**
  28. * Tests that profiles with an empty config/sync directory do not work.
  29. */
  30. public function testConfigSync() {
  31. $this->assertTitle('Configuration validation | Drupal');
  32. $this->assertText('The configuration synchronization failed validation.');
  33. $this->assertText('This import is empty and if applied would delete all of your configuration, so has been rejected.');
  34. // Ensure there is no continuation button.
  35. $this->assertNoText('Save and continue');
  36. $this->assertNoFieldById('edit-submit');
  37. }
  38. }