1 | <?php |
||
28 | final class ContextServiceEnvironmentHandler implements EnvironmentHandler |
||
29 | { |
||
30 | /** |
||
31 | * @var ContainerInterface |
||
32 | */ |
||
33 | private $container; |
||
34 | |||
35 | /** |
||
36 | * @var ContextRegistry |
||
37 | */ |
||
38 | private $contextRegistry; |
||
39 | |||
40 | /** |
||
41 | * @param ContainerInterface $container |
||
42 | * @param ContextRegistry $contextRegistry |
||
43 | */ |
||
44 | public function __construct(ContainerInterface $container, ContextRegistry $contextRegistry) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function supportsSuite(Suite $suite) |
||
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | public function buildEnvironment(Suite $suite) |
||
70 | |||
71 | /** |
||
72 | * {@inheritdoc} |
||
73 | */ |
||
74 | public function supportsEnvironmentAndSubject(Environment $environment, $testSubject = null) |
||
78 | |||
79 | /** |
||
80 | * {@inheritdoc} |
||
81 | * |
||
82 | * @throws EnvironmentIsolationException |
||
83 | */ |
||
84 | public function isolateEnvironment(Environment $uninitializedEnvironment, $testSubject = null) |
||
98 | |||
99 | /** |
||
100 | * @param Suite $suite |
||
101 | * |
||
102 | * @return string[] |
||
103 | * |
||
104 | * @throws SuiteConfigurationException If "contexts_services" setting is not an array |
||
105 | */ |
||
106 | private function getSuiteContextsServices(Suite $suite) |
||
120 | |||
121 | /** |
||
122 | * @param Environment $uninitializedEnvironment |
||
123 | * @param mixed $testSubject |
||
124 | * |
||
125 | * @throws EnvironmentIsolationException |
||
126 | */ |
||
127 | private function assertEnvironmentCanBeIsolated(Environment $uninitializedEnvironment, $testSubject) |
||
137 | } |
||
138 |