class ConfigOtherModuleTest extends BrowserTestBase
{ /**
* {@inheritdoc}
*/
protected $defaultTheme = 'stark';
/**
* Tests enabling the provider of the default configuration first.
*/
public function testInstallOtherModuleFirst() { $this->
installModule('config_other_module_config_test'
);
// Check that the config entity doesn't exist before the config_test module
// is enabled. We cannot use the entity system because the config_test
// entity type does not exist.
$config =
$this->
config('config_test.dynamic.other_module_test'
);
$this->
assertTrue($config->
isNew(), 'Default configuration for other modules is not installed if that module is not enabled.'
);
// Install the module that provides the entity type. This installs the
// default configuration.
$this->
installModule('config_test'
);
$this->
assertNotEmpty($this->
getStorage()->
load('other_module_test'
), 'Default configuration has been installed.'
);