diff --git a/core/tests/Drupal/Tests/Core/Cache/CacheContextsTest.php b/core/tests/Drupal/Tests/Core/Cache/CacheContextsTest.php index 6e5864d..be5add1 100644 --- a/core/tests/Drupal/Tests/Core/Cache/CacheContextsTest.php +++ b/core/tests/Drupal/Tests/Core/Cache/CacheContextsTest.php @@ -55,7 +55,8 @@ public function testContextPlaceholdersAreReplaced() { ->with("cache_context.foo") ->will($this->returnValue(new FooCacheContext())); - $cache_contexts = new CacheContexts($container, $this->getContextsFixture()); + $cache_contexts = new CacheContexts($this->getContextsFixture()); + $cache_contexts->setContainer($container); $new_keys = $cache_contexts->convertTokensToKeys( array("non-cache-context", "cache_context.foo") @@ -66,7 +67,8 @@ public function testContextPlaceholdersAreReplaced() { } public function testAvailableContextStrings() { - $cache_contexts = new CacheContexts($this->getMockContainer(), $this->getContextsFixture()); + $cache_contexts = new CacheContexts($this->getContextsFixture()); + $cache_contexts->setContainer($this->getMockContainer()); $contexts = $cache_contexts->getAll(); $this->assertEquals(array("cache_context.foo"), $contexts); } @@ -78,7 +80,8 @@ public function testAvailableContextLabels() { ->with("cache_context.foo") ->will($this->returnValue(new FooCacheContext())); - $cache_contexts = new CacheContexts($container, $this->getContextsFixture()); + $cache_contexts = new CacheContexts($this->getContextsFixture()); + $cache_contexts->setContainer($this->getMockContainer()); $labels = $cache_contexts->getLabels(); $expected = array("cache_context.foo" => "Foo"); $this->assertEquals($expected, $labels); diff --git a/core/tests/Drupal/Tests/Core/HttpKernelTest.php b/core/tests/Drupal/Tests/Core/HttpKernelTest.php index 10a5f76..bf712ec 100644 --- a/core/tests/Drupal/Tests/Core/HttpKernelTest.php +++ b/core/tests/Drupal/Tests/Core/HttpKernelTest.php @@ -49,7 +49,8 @@ public function testSetupSubrequest() { $controller_resolver = new ControllerResolver(); $controller_resolver->setContainer($container); - $http_kernel = new HttpKernel($dispatcher, $container, $controller_resolver); + $http_kernel = new HttpKernel($dispatcher, $controller_resolver); + $http_kernel->setContainer($container); $test_controller = '\Drupal\Tests\Core\Controller\TestController'; $random_attribute = $this->randomName();