function LayoutBuilderIsActiveCacheContextTest::testGetContextMissingEntityTypeId
Same name in other branches
- 9 core/modules/layout_builder/tests/src/Unit/LayoutBuilderIsActiveCacheContextTest.php \Drupal\Tests\layout_builder\Unit\LayoutBuilderIsActiveCacheContextTest::testGetContextMissingEntityTypeId()
- 11.x core/modules/layout_builder/tests/src/Unit/LayoutBuilderIsActiveCacheContextTest.php \Drupal\Tests\layout_builder\Unit\LayoutBuilderIsActiveCacheContextTest::testGetContextMissingEntityTypeId()
@covers ::getContext
File
-
core/
modules/ layout_builder/ tests/ src/ Unit/ LayoutBuilderIsActiveCacheContextTest.php, line 29
Class
- LayoutBuilderIsActiveCacheContextTest
- @coversDefaultClass \Drupal\layout_builder\Cache\LayoutBuilderIsActiveCacheContext
Namespace
Drupal\Tests\layout_builder\UnitCode
public function testGetContextMissingEntityTypeId() : void {
$route_match = $this->prophesize(RouteMatchInterface::class);
$cache_context = new LayoutBuilderIsActiveCacheContext($route_match->reveal());
$this->expectException(\LogicException::class);
$this->expectExceptionMessage('Missing entity type ID');
$cache_context->getContext();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.