Commit 8d37d8f3 authored by catch's avatar catch

Issue #2280501 by alexpott: Fixed Ensure web tests are encapsulated.

parent 0a7f5b84
......@@ -29,6 +29,15 @@ public static function getInfo() {
);
}
/**
* {@inheritdoc}
*/
protected function setUp() {
$original_container = \Drupal::getContainer();
parent::setUp();
$this->assertNotIdentical(\Drupal::getContainer(), $original_container, 'KernelTestBase test creates a new container.');
}
/**
* Tests expected behavior of setUp().
*/
......
......@@ -74,7 +74,9 @@ class: Drupal\Core\Cache\MemoryBackendFactory
EOD;
file_put_contents($this->siteDirectory . '/testing.services.yml', $yaml);
$original_container = \Drupal::getContainer();
parent::setUp();
$this->assertNotIdentical(\Drupal::getContainer(), $original_container, 'WebTestBase test creates a new container.');
// Create and log in an admin user.
$this->drupalLogin($this->drupalCreateUser(array('administer unit tests')));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment