InstallerPostInstallTest.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace Drupal\FunctionalTests\Installer;
  3. /**
  4. * Tests re-visiting the installer after a successful installation.
  5. *
  6. * @group Installer
  7. */
  8. class InstallerPostInstallTest extends InstallerTestBase {
  9. /**
  10. * {@inheritdoc}
  11. */
  12. protected $profile = 'minimal';
  13. /**
  14. * {@inheritdoc}
  15. */
  16. protected $defaultTheme = 'stark';
  17. /**
  18. * Confirms that visiting the installer does not break things post-install.
  19. */
  20. public function testVisitInstallerPostInstall() {
  21. \Drupal::service('module_installer')->install(['system_test']);
  22. // Clear caches to ensure that system_test's routes are available.
  23. $this->resetAll();
  24. // Confirm that the install_profile is correct.
  25. $this->drupalGet('/system-test/get-install-profile');
  26. $this->assertText('minimal');
  27. // Make an anonymous visit to the installer
  28. $this->drupalLogout();
  29. $this->visitInstaller();
  30. // Ensure that the install profile is still correct.
  31. $this->drupalGet('/system-test/get-install-profile');
  32. $this->assertText('minimal');
  33. }
  34. }