public function ConfigInstallWebTest::testUnmetDependenciesInstall in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/config/src/Tests/ConfigInstallWebTest.php \Drupal\config\Tests\ConfigInstallWebTest::testUnmetDependenciesInstall()
Tests unmet dependencies detection.
File
- core/
modules/ config/ src/ Tests/ ConfigInstallWebTest.php, line 182 - Contains \Drupal\config\Tests\ConfigInstallWebTest.
Class
- ConfigInstallWebTest
- Tests installation and removal of configuration objects in install, disable and uninstall functionality.
Namespace
Drupal\config\TestsCode
public function testUnmetDependenciesInstall() {
$this
->drupalLogin($this->adminUser);
// We need to install separately since config_install_dependency_test does
// not depend on config_test and order is important.
$this
->drupalPostForm('admin/modules', array(
'modules[Testing][config_test][enable]' => TRUE,
), t('Install'));
$this
->drupalPostForm('admin/modules', array(
'modules[Testing][config_install_dependency_test][enable]' => TRUE,
), t('Install'));
$this
->assertRaw('Unable to install Config install dependency test, <em class="placeholder">config_test.dynamic.other_module_test_with_dependency</em> has unmet dependencies.');
$this
->drupalPostForm('admin/modules', array(
'modules[Testing][config_other_module_config_test][enable]' => TRUE,
), t('Install'));
$this
->drupalPostForm('admin/modules', array(
'modules[Testing][config_install_dependency_test][enable]' => TRUE,
), t('Install'));
$this
->rebuildContainer();
$this
->assertTrue(entity_load('config_test', 'other_module_test_with_dependency'), 'The config_test.dynamic.other_module_test_with_dependency configuration has been created during install.');
}