$trait->
expects($this->
any()) ->
method('getEditableConfigNames'
) ->
willReturn(['editable.config'
]);
$config_method =
new \
ReflectionMethod($trait, 'config'
);
// Ensure that configuration that is expected to be mutable is.
$result =
$config_method->
invoke($trait, 'editable.config'
);
$this->
assertInstanceOf('\Drupal\Core\Config\Config',
$result);
$this->
assertNotInstanceOf('\Drupal\Core\Config\ImmutableConfig',
$result);
// Ensure that configuration that is expected to be immutable is.
$result =
$config_method->
invoke($trait, 'immutable.config'
);
$this->
assertInstanceOf('\Drupal\Core\Config\ImmutableConfig',
$result);
} /**
* @covers ::config
*/
public function testConfigFactoryException() { $trait =
$this->
getMockForTrait('Drupal\Core\Form\ConfigFormBaseTrait'
);