protected function HelperTrait::composeStylesSettings in Style Switcher 3.0.x
Same name and namespace in other branches
- 8.2 tests/src/Functional/HelperTrait.php \Drupal\Tests\styleswitcher\Functional\HelperTrait::composeStylesSettings()
Helps compose the Styles Settings array with default values.
Parameters
string[] $keys: Styles' names.
Return value
array[] Styles Settings list as in the config.
5 calls to HelperTrait::composeStylesSettings()
- ConfigTest::testActiveStyleOnStyleDelete in tests/
src/ Functional/ ConfigTest.php - Tests active style is replaced with default one when deleted.
- ConfigTest::testConfigStylesSettings in tests/
src/ Functional/ ConfigTest.php - Tests the styles settings config.
- CookieTest::testCookie in tests/
src/ Functional/ CookieTest.php - Tests the cookie is set for the whole site.
- CookieUpdateTest::testCookieUpdates in tests/
src/ Functional/ CookieUpdateTest.php - Tests cookie updates.
- FormTest::testConfigThemeForm in tests/
src/ Functional/ FormTest.php - Tests the config theme form exists and functions properly.
File
- tests/
src/ Functional/ HelperTrait.php, line 118
Class
- HelperTrait
- Provides helper methods for the Style Switcher testing.
Namespace
Drupal\Tests\styleswitcher\FunctionalCode
protected function composeStylesSettings(array $keys) : array {
return array_fill_keys($keys, [
'weight' => 0,
'status' => TRUE,
'is_default' => FALSE,
]);
}