function CacheContextsManagerTest::testAvailableContextStrings

Same name and namespace in other branches
  1. 11.x core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php \Drupal\Tests\Core\Cache\Context\CacheContextsManagerTest::testAvailableContextStrings()
  2. 10 core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php \Drupal\Tests\Core\Cache\Context\CacheContextsManagerTest::testAvailableContextStrings()
  3. 9 core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php \Drupal\Tests\Core\Cache\Context\CacheContextsManagerTest::testAvailableContextStrings()
  4. 8.9.x core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php \Drupal\Tests\Core\Cache\Context\CacheContextsManagerTest::testAvailableContextStrings()

File

core/tests/Drupal/Tests/Core/Cache/Context/CacheContextsManagerTest.php, line 164

Class

CacheContextsManagerTest
Tests Drupal\Core\Cache\Context\CacheContextsManager.

Namespace

Drupal\Tests\Core\Cache\Context

Code

public function testAvailableContextStrings() : void {
  $cache_contexts_manager = new CacheContextsManager($this->getMockContainer(), $this->getContextsFixture());
  $contexts = $cache_contexts_manager->getAll();
  $this->assertEquals([
    "foo",
    "baz",
  ], $contexts);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.