Allow accessing a context in another context

This commit is contained in:
Kamil Kokot
2019-03-04 13:32:09 +01:00
parent b20eacd2b2
commit 13d64ca7cb
2 changed files with 73 additions and 1 deletions

View File

@@ -72,9 +72,11 @@ final class InitializedSymfonyExtensionEnvironment implements SymfonyExtensionEn
}
/**
* @see http://behat.org/en/latest/cookbooks/accessing_contexts_from_each_other.html
*
* @throws ContextNotFoundException
*/
private function getContext(string $class): Context
public function getContext(string $class): Context
{
if (!isset($this->contexts[$class])) {
throw new ContextNotFoundException(sprintf(