parent::
setUp();
$this->
installConfig(['system'
]);
} /**
* Tests the import transformation.
*/
public function testTransform() { // Get the raw system.site config and set it in the sync storage.
$rawConfig =
$this->
config('system.site'
)->
getRawData();
$storage =
new MemoryStorage();
$this->
copyConfig($this->container->
get('config.storage'
),
$storage);
$import =
$this->container->
get('config.import_transformer'
)->
transform($storage);
$config =
$import->
read('system.site'
);
// The test subscriber always adds "Arrr" to the current site name.
$this->
assertEquals($rawConfig['name'
] . ' Arrr',
$config['name'
]);
$this->
assertEquals($rawConfig['slogan'
],
$config['slogan'
]);
// Update the site config in the storage to test a second transformation.
$config['name'
] = 'New name';
$config['slogan'
] = 'New slogan';