push($request); $cache_context = new PathParentCacheContext($request_stack); $this->assertSame($cache_context->getContext(), $context); } /** * Provides a list of paths and expected cache contexts. */ public function providerTestGetContext() { return [ ['/some/path', 'some'], ['/some/other-path', 'some'], ['/some/other/path', 'some/other'], ['/some/other/path?q=foo&b=bar', 'some/other'], ['/some', ''], ['/', ''], ]; } }