function GenerateThemeTest::writeStarterkitConfig

Same name in other branches
  1. 11.x core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php \Drupal\BuildTests\Command\GenerateThemeTest::writeStarterkitConfig()
6 calls to GenerateThemeTest::writeStarterkitConfig()
GenerateThemeTest::testDeleteDirectory in core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php
GenerateThemeTest::testInfoOverrides in core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php
GenerateThemeTest::testNoEdit in core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php
GenerateThemeTest::testNoEditMissingFilesWarning in core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php
GenerateThemeTest::testNoRename in core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php

... See full list

File

core/tests/Drupal/BuildTests/Command/GenerateThemeTest.php, line 603

Class

GenerateThemeTest
Tests the generate-theme commands.

Namespace

Drupal\BuildTests\Command

Code

private function writeStarterkitConfig(array $config) : void {
    $starterkit_yml = $this->getWorkspaceDirectory() . '/core/themes/starterkit_theme/starterkit_theme.starterkit.yml';
    $starterkit_config = Yaml::decode(file_get_contents($starterkit_yml));
    $starterkit_config = array_replace_recursive($starterkit_config, $config);
    file_put_contents($starterkit_yml, Yaml::encode($starterkit_config));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.