function ConfigOtherModuleTest::testInstallConfigEntityModuleFirst

Same name in other branches
  1. 8.9.x core/modules/config/tests/src/Functional/ConfigOtherModuleTest.php \Drupal\Tests\config\Functional\ConfigOtherModuleTest::testInstallConfigEntityModuleFirst()
  2. 10 core/modules/config/tests/src/Kernel/ConfigOtherModuleTest.php \Drupal\Tests\config\Kernel\ConfigOtherModuleTest::testInstallConfigEntityModuleFirst()
  3. 11.x core/modules/config/tests/src/Kernel/ConfigOtherModuleTest.php \Drupal\Tests\config\Kernel\ConfigOtherModuleTest::testInstallConfigEntityModuleFirst()

Tests enabling the provider of the config entity type first.

File

core/modules/config/tests/src/Functional/ConfigOtherModuleTest.php, line 98

Class

ConfigOtherModuleTest
Tests default configuration provided by a module that does not own it.

Namespace

Drupal\Tests\config\Functional

Code

public function testInstallConfigEntityModuleFirst() {
    $this->installModule('config_test');
    $this->assertNull($this->getStorage()
        ->load('other_module_test'), 'Default configuration provided by config_other_module_config_test does not exist.');
    $this->installModule('config_other_module_config_test');
    $this->assertNotEmpty($this->getStorage()
        ->load('other_module_test'), 'Default configuration provided by config_other_module_config_test has been installed.');
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.