public function LazyContextRepositoryTest::testGetRuntimeMultipleContextsPerService in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Plugin/Context/LazyContextRepositoryTest.php \Drupal\Tests\Core\Plugin\Context\LazyContextRepositoryTest::testGetRuntimeMultipleContextsPerService()
@covers ::getRuntimeContexts
File
- core/
tests/ Drupal/ Tests/ Core/ Plugin/ Context/ LazyContextRepositoryTest.php, line 52 - Contains \Drupal\Tests\Core\Plugin\Context\LazyContextRepositoryTest.
Class
- LazyContextRepositoryTest
- @coversDefaultClass \Drupal\Core\Plugin\Context\LazyContextRepository @group context
Namespace
Drupal\Tests\Core\Plugin\ContextCode
public function testGetRuntimeMultipleContextsPerService() {
$contexts = $this
->setupContextAndProvider('test_provider', [
'test_context0',
'test_context1',
]);
$lazy_context_repository = new LazyContextRepository($this->container, [
'test_provider',
]);
$run_time_contexts = $lazy_context_repository
->getRuntimeContexts([
'@test_provider:test_context0',
'@test_provider:test_context1',
]);
$this
->assertEquals([
'@test_provider:test_context0' => $contexts[0],
'@test_provider:test_context1' => $contexts[1],
], $run_time_contexts);
}