class StandardInstallerTest
Same name and namespace in other branches
- 11.x core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php \Drupal\FunctionalTests\Installer\StandardInstallerTest
- 10 core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php \Drupal\FunctionalTests\Installer\StandardInstallerTest
- 8.9.x core/tests/Drupal/FunctionalTests/Installer/StandardInstallerTest.php \Drupal\FunctionalTests\Installer\StandardInstallerTest
Tests the interactive installer installing the standard profile.
@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 extends \PHPUnit\Framework\TestCase
- class \Drupal\FunctionalTests\Installer\InstallerTestBase uses \Drupal\Tests\RequirementsPageTrait extends \Drupal\Tests\BrowserTestBase
- class \Drupal\FunctionalTests\Installer\ConfigAfterInstallerTestBase uses \Drupal\KernelTests\AssertConfigTrait extends \Drupal\FunctionalTests\Installer\InstallerTestBase
- class \Drupal\FunctionalTests\Installer\StandardInstallerTest extends \Drupal\FunctionalTests\Installer\ConfigAfterInstallerTestBase
- class \Drupal\FunctionalTests\Installer\ConfigAfterInstallerTestBase uses \Drupal\KernelTests\AssertConfigTrait extends \Drupal\FunctionalTests\Installer\InstallerTestBase
- class \Drupal\FunctionalTests\Installer\InstallerTestBase uses \Drupal\Tests\RequirementsPageTrait extends \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of StandardInstallerTest
File
-
core/
tests/ Drupal/ FunctionalTests/ Installer/ StandardInstallerTest.php, line 10
Namespace
Drupal\FunctionalTests\InstallerView source
class StandardInstallerTest extends ConfigAfterInstallerTestBase {
/**
* {@inheritdoc}
*/
protected $profile = 'standard';
/**
* Ensures that the user page is available after installation.
*/
public function testInstaller() {
// Verify that Olivero's default frontpage appears.
$this->assertSession()
->pageTextContains('Congratulations and welcome to the Drupal community.');
$this->assertSession()
->elementTextContains('css', '#block-olivero-powered', 'Powered by Drupal');
}
/**
* {@inheritdoc}
*/
protected function setUpSite() {
// Test that the correct theme is being used.
$this->assertSession()
->responseNotContains('olivero');
$this->assertSession()
->responseContains('css/theme/install-page.css');
parent::setUpSite();
}
/**
* Ensures that the exported standard configuration is up to date.
*/
public function testStandardConfig() {
$skipped_config = [];
// FunctionalTestSetupTrait::installParameters() uses Drupal as site name
// and simpletest@example.com as mail address.
$skipped_config['system.site'][] = 'name: Drupal';
$skipped_config['system.site'][] = 'mail: simpletest@example.com';
$skipped_config['contact.form.feedback'][] = '- simpletest@example.com';
// \Drupal\filter\Entity\FilterFormat::toArray() drops the roles of filter
// formats.
$skipped_config['filter.format.basic_html'][] = 'roles:';
$skipped_config['filter.format.basic_html'][] = '- authenticated';
$skipped_config['filter.format.full_html'][] = 'roles:';
$skipped_config['filter.format.full_html'][] = '- administrator';
$skipped_config['filter.format.restricted_html'][] = 'roles:';
$skipped_config['filter.format.restricted_html'][] = '- anonymous';
// The site UUID is set dynamically for each installation.
$skipped_config['system.site'][] = 'uuid: ' . $this->config('system.site')
->get('uuid');
$this->assertInstalledConfig($skipped_config);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.