function WorkspaceRequestSubscriberTest::testOnKernelRequestWithoutCacheableRouteProvider
Same name in other branches
- 9 core/modules/workspaces/tests/src/Unit/WorkspaceRequestSubscriberTest.php \Drupal\Tests\workspaces\Unit\WorkspaceRequestSubscriberTest::testOnKernelRequestWithoutCacheableRouteProvider()
- 8.9.x core/modules/workspaces/tests/src/Unit/WorkspaceRequestSubscriberTest.php \Drupal\Tests\workspaces\Unit\WorkspaceRequestSubscriberTest::testOnKernelRequestWithoutCacheableRouteProvider()
- 11.x core/modules/workspaces/tests/src/Unit/WorkspaceRequestSubscriberTest.php \Drupal\Tests\workspaces\Unit\WorkspaceRequestSubscriberTest::testOnKernelRequestWithoutCacheableRouteProvider()
@covers ::onKernelRequest
File
-
core/
modules/ workspaces/ tests/ src/ Unit/ WorkspaceRequestSubscriberTest.php, line 59
Class
- WorkspaceRequestSubscriberTest
- @coversDefaultClass \Drupal\workspaces\EventSubscriber\WorkspaceRequestSubscriber
Namespace
Drupal\Tests\workspaces\UnitCode
public function testOnKernelRequestWithoutCacheableRouteProvider() : void {
$route_provider = $this->prophesize(RouteProviderInterface::class);
// Check that WorkspaceRequestSubscriber::onKernelRequest() doesn't call
// addExtraCacheKeyPart() on a route provider that does not implement
// CacheableRouteProviderInterface.
$workspace_request_subscriber = new WorkspaceRequestSubscriber($route_provider->reveal(), $this->workspaceManager
->reveal());
$event = $this->prophesize(RequestEvent::class)
->reveal();
$this->assertNull($workspace_request_subscriber->onKernelRequest($event));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.