You are here

public function RouteGroupCacheContextTest::testGetCacheableMetadata in Group 8

Same name and namespace in other branches
  1. 2.0.x tests/src/Unit/RouteGroupCacheContextTest.php \Drupal\Tests\group\Unit\RouteGroupCacheContextTest::testGetCacheableMetadata()

Tests getting the cacheable metadata for the cache context.

@covers ::getCacheableMetadata

File

tests/src/Unit/RouteGroupCacheContextTest.php, line 103

Class

RouteGroupCacheContextTest
Tests the route.group cache context.

Namespace

Drupal\Tests\group\Unit

Code

public function testGetCacheableMetadata() {
  $cache_context = new RouteGroupCacheContext($this->currentRouteMatch
    ->reveal(), $this->entityTypeManager
    ->reveal());
  $this
    ->assertEquals(new CacheableMetadata(), $cache_context
    ->getCacheableMetadata());
}