$lazy_context_repository->
getRuntimeContexts(['@test_provider:test_context0', '@test_provider:test_context1'
]);
} /**
* @covers ::getAvailableContexts
*/
public function testGetAvailableContexts() { $contexts0 =
$this->
setupContextAndProvider('test_provider0',
['test0_context0', 'test0_context1'
]);
$contexts1 =
$this->
setupContextAndProvider('test_provider1',
['test1_context0', 'test1_context1'
]);
$lazy_context_repository =
new LazyContextRepository($this->container,
['test_provider0', 'test_provider1'
]);
$contexts =
$lazy_context_repository->
getAvailableContexts();
$this->
assertEquals([ '@test_provider0:test0_context0' =>
$contexts0[0
],
'@test_provider0:test0_context1' =>
$contexts0[1
],
'@test_provider1:test1_context0' =>
$contexts1[0
],
'@test_provider1:test1_context1' =>
$contexts1[1
],
],
$contexts);
} /**
* Sets up contexts and context providers.
*
* @param string $service_id
* The service ID of the service provider.
* @param string[] $unqualified_context_ids
* An array of context slot names.
* @param string[] $expected_unqualified_context_ids
* The expected unqualified context IDs passed to getRuntimeContexts.
*
* @return array
* An array of set up contexts.
*/