function LazyContextRepositoryTest::testInvalidContextId
Same name in other branches
- 9 core/tests/Drupal/Tests/Core/Plugin/Context/LazyContextRepositoryTest.php \Drupal\Tests\Core\Plugin\Context\LazyContextRepositoryTest::testInvalidContextId()
- 8.9.x core/tests/Drupal/Tests/Core/Plugin/Context/LazyContextRepositoryTest.php \Drupal\Tests\Core\Plugin\Context\LazyContextRepositoryTest::testInvalidContextId()
- 11.x core/tests/Drupal/Tests/Core/Plugin/Context/LazyContextRepositoryTest.php \Drupal\Tests\Core\Plugin\Context\LazyContextRepositoryTest::testInvalidContextId()
@covers ::getRuntimeContexts
File
-
core/
tests/ Drupal/ Tests/ Core/ Plugin/ Context/ LazyContextRepositoryTest.php, line 72
Class
- LazyContextRepositoryTest
- @coversDefaultClass \Drupal\Core\Plugin\Context\LazyContextRepository @group context
Namespace
Drupal\Tests\Core\Plugin\ContextCode
public function testInvalidContextId() : void {
$lazy_context_repository = new LazyContextRepository($this->container, [
'test_provider',
]);
$this->expectException(\AssertionError::class);
$this->expectExceptionMessage('You must provide the context IDs in the @{service_id}:{unqualified_context_id} format.');
$lazy_context_repository->getRuntimeContexts([
'test_context',
'@test_provider:test_context1',
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.