public function gatherContexts(BeforeScenarioScope $scope) { $environment = $scope->getEnvironment(); $this->contentContext = $environment->getContext('eZ\\Bundle\\EzPublishCoreBundle\\Features\\Context\\ContentContext'); }