diff --git a/core/modules/config/src/Tests/ConfigCRUDTest.php b/core/modules/config/src/Tests/ConfigCRUDTest.php index 4c3642e..74b0d85 100644 --- a/core/modules/config/src/Tests/ConfigCRUDTest.php +++ b/core/modules/config/src/Tests/ConfigCRUDTest.php @@ -72,6 +72,11 @@ function testCRUD() { $this->assertIdentical($new_config->get(), $config->get()); $this->assertIdentical($config->isNew(), FALSE); + // Pollute the config factory static cache. + $this->container->get('config.factory')->setOverrideState(FALSE); + \Drupal::config($name); + $this->container->get('config.factory')->setOverrideState(TRUE); + // Delete the configuration object. $config->delete(); @@ -79,6 +84,12 @@ function testCRUD() { $this->assertIdentical($config->get(), array()); $this->assertIdentical($config->isNew(), TRUE); + // Verify that all copies of the configuration has been removed from the + // static cache. + $this->container->get('config.factory')->setOverrideState(FALSE); + $this->assertIdentical(\Drupal::config($name)->isNew(), TRUE); + $this->container->get('config.factory')->setOverrideState(TRUE); + // Verify the active configuration contains no value. $actual_data = $storage->read($name); $this->assertIdentical($actual_data, FALSE);