class InstallerPostInstallTest
Same name and namespace in other branches
- 11.x core/tests/Drupal/FunctionalTests/Installer/InstallerPostInstallTest.php \Drupal\FunctionalTests\Installer\InstallerPostInstallTest
Tests re-visiting the installer after a successful installation.
@group Installer
Hierarchy
- class \Drupal\Tests\BrowserTestBase uses \Drupal\Core\Test\FunctionalTestSetupTrait, \Drupal\Tests\UiHelperTrait, \Drupal\Core\Test\TestSetupTrait, \Drupal\Tests\block\Traits\BlockCreationTrait, \Drupal\FunctionalTests\AssertLegacyTrait, \Drupal\Tests\RandomGeneratorTrait, \Drupal\Tests\node\Traits\NodeCreationTrait, \Drupal\Tests\node\Traits\ContentTypeCreationTrait, \Drupal\Tests\ConfigTestTrait, \Drupal\Tests\TestRequirementsTrait, \Drupal\Tests\user\Traits\UserCreationTrait, \Drupal\Tests\XdebugRequestTrait, \Drupal\Tests\Traits\PhpUnitWarnings, \Drupal\Tests\PhpUnitCompatibilityTrait, \Symfony\Bridge\PhpUnit\ExpectDeprecationTrait, \Drupal\Tests\ExtensionListTestTrait implements \PHPUnit\Framework\TestCase
- class \Drupal\FunctionalTests\Installer\InstallerTestBase uses \Drupal\Tests\RequirementsPageTrait implements \Drupal\Tests\BrowserTestBase
- class \Drupal\FunctionalTests\Installer\InstallerPostInstallTest implements \Drupal\FunctionalTests\Installer\InstallerTestBase
- class \Drupal\FunctionalTests\Installer\InstallerTestBase uses \Drupal\Tests\RequirementsPageTrait implements \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of InstallerPostInstallTest
File
-
core/
tests/ Drupal/ FunctionalTests/ Installer/ InstallerPostInstallTest.php, line 10
Namespace
Drupal\FunctionalTests\InstallerView source
class InstallerPostInstallTest extends InstallerTestBase {
/**
* {@inheritdoc}
*/
protected $profile = 'minimal';
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Confirms that visiting the installer does not break things post-install.
*/
public function testVisitInstallerPostInstall() {
\Drupal::service('module_installer')->install([
'system_test',
]);
// Clear caches to ensure that system_test's routes are available.
$this->resetAll();
// Confirm that the install_profile is correct.
$this->drupalGet('/system-test/get-install-profile');
$this->assertSession()
->pageTextContains('minimal');
// Make an anonymous visit to the installer
$this->drupalLogout();
$this->visitInstaller();
// Ensure that the install profile is still correct.
$this->drupalGet('/system-test/get-install-profile');
$this->assertSession()
->pageTextContains('minimal');
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.