class SiteConfigOverridesTest in Config override 8
@coversDefaultClass \Drupal\config_override\SiteConfigOverrides @group config_override
Hierarchy
- class \Drupal\config_override\Tests\Unit\SiteConfigOverridesTest extends \PHPUnit\Framework\TestCase
Expanded class hierarchy of SiteConfigOverridesTest
File
- tests/
Unit/ SiteConfigOverridesTest.php, line 15
Namespace
Drupal\config_override\Tests\UnitView source
class SiteConfigOverridesTest extends TestCase {
public function testSiteOverride() {
$cache_backend = $this
->prophesize(CacheBackendInterface::class);
$site_override = new SiteConfigOverrides('vfs://drupal', $cache_backend
->reveal());
vfsStream::setup('drupal');
vfsStream::create([
'sites' => [
'default' => [
'config' => [
'override' => [
'system.site.yml' => Yaml::encode([
'name' => 'Hey jude',
]),
],
],
],
],
]);
$result = $site_override
->loadOverrides([
'system.site',
]);
$this
->assertEquals([
'system.site' => [
'name' => 'Hey jude',
],
], $result);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SiteConfigOverridesTest:: |
public | function |