class InstallerSiteConfigProfileTest
Same name and namespace in other branches
- 11.x core/tests/Drupal/FunctionalTests/Installer/InstallerSiteConfigProfileTest.php \Drupal\FunctionalTests\Installer\InstallerSiteConfigProfileTest
- 10 core/tests/Drupal/FunctionalTests/Installer/InstallerSiteConfigProfileTest.php \Drupal\FunctionalTests\Installer\InstallerSiteConfigProfileTest
- 8.9.x core/tests/Drupal/FunctionalTests/Installer/InstallerSiteConfigProfileTest.php \Drupal\FunctionalTests\Installer\InstallerSiteConfigProfileTest
Verifies that the installer uses the profile's site configuration.
@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\InstallerSiteConfigProfileTest extends \Drupal\FunctionalTests\Installer\InstallerTestBase
- class \Drupal\FunctionalTests\Installer\InstallerTestBase uses \Drupal\Tests\RequirementsPageTrait extends \Drupal\Tests\BrowserTestBase
Expanded class hierarchy of InstallerSiteConfigProfileTest
File
-
core/
tests/ Drupal/ FunctionalTests/ Installer/ InstallerSiteConfigProfileTest.php, line 10
Namespace
Drupal\FunctionalTests\InstallerView source
class InstallerSiteConfigProfileTest extends InstallerTestBase {
/**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* {@inheritdoc}
*/
protected $profile = 'testing_site_config';
/**
* The site mail we expect to be set from the install profile.
*
* @see testing_site_config_install()
*/
const EXPECTED_SITE_MAIL = 'profile-testing-site-config@example.com';
/**
* The timezone we expect to be set from the install profile.
*
* @see testing_site_config_install()
*/
const EXPECTED_TIMEZONE = 'America/Los_Angeles';
/**
* {@inheritdoc}
*/
protected function installParameters() {
$parameters = parent::installParameters();
// Don't override the site email address, allowing it to default to the one
// from our install profile.
unset($parameters['forms']['install_configure_form']['site_mail']);
return $parameters;
}
/**
* {@inheritdoc}
*/
protected function setUpSite() {
$this->assertSession()
->fieldValueEquals('site_mail', self::EXPECTED_SITE_MAIL);
$this->assertSession()
->fieldValueEquals('date_default_timezone', self::EXPECTED_TIMEZONE);
return parent::setUpSite();
}
/**
* Verify the correct site config was set.
*/
public function testInstaller() {
$this->assertEquals(self::EXPECTED_SITE_MAIL, $this->config('system.site')
->get('mail'));
$this->assertEquals(self::EXPECTED_TIMEZONE, $this->config('system.date')
->get('timezone.default'));
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.