Tests basic locale override.
function testConfigLocaleOverride() {
$name = 'config_test.system';
// The default language is en so the config key should be localised.
$config = config($name);
$this
->assertIdentical($config
->get('foo'), 'en bar');
$this
->assertIdentical($config
->get('404'), 'herp');
// Ensure that we get the expected value when we avoid overrides.
config_context_enter('config.context.free');
$config_admin = config($name);
$this
->assertIdentical($config_admin
->get('foo'), 'bar');
$this
->assertIdentical($config_admin
->get('404'), 'herp');
// Leave the non override context.
config_context_leave();
$config = config($name);
$this
->assertIdentical($config
->get('foo'), 'en bar');
$this
->assertIdentical($config
->get('404'), 'herp');
}