You are here

public function CacheContextsTest::test_getLabels in Render cache 7.2

Tests that CacheContexts::getLabels() is working properly. @covers ::getLabels()

File

tests/src/Cache/CacheContextsTest.php, line 60
Contains \Drupal\render_cache\Tests\Cache\CacheContextsTest

Class

CacheContextsTest
@coversDefaultClass \Drupal\render_cache\Cache\CacheContexts @group cache

Namespace

Drupal\render_cache\Tests\Cache

Code

public function test_getLabels() {
  $this
    ->assertEquals(array(
    'cache_context.foo' => 'Foo',
  ), $this->cacheContexts
    ->getLabels(), 'Cache Contexts service retrieves the right labels.');
}