public function testEnableWithoutDependency() { // Attempt to enable Content Translation without Language enabled.
$edit =
[];
$edit['modules[content_translation][enable]'
] = 'content_translation';
$this->
drupalGet('admin/modules'
);
$this->
submitForm($edit, 'Install'
);
$this->
assertSession()->
pageTextContains('Some required modules must be enabled'
);
$this->
assertModules(['content_translation', 'language'
], FALSE
);
// Assert that the language module config was not installed.
$this->
assertNoModuleConfig('language'
);
$this->
submitForm([], 'Continue'
);
$this->
assertSession()->
pageTextContains('2 modules have been enabled: Content Translation, Language.'
);
$this->
assertModules(['content_translation', 'language'
], TRUE
);
// Assert that the language YAML files were created.
$storage =
$this->container->
get('config.storage'
);
$this->
assertNotEmpty($storage->
listAll('language.entity.'
), 'Language config entity files exist.'
);
} /**
* Attempts to enable a module with a missing dependency.
*/