1 | <?php |
||
30 | abstract class AbstractAliceContext implements KernelAwareContext, AliceContextInterface |
||
31 | { |
||
32 | /** |
||
33 | * @var string |
||
34 | */ |
||
35 | protected $basePath; |
||
36 | |||
37 | /** |
||
38 | * @var KernelInterface |
||
39 | */ |
||
40 | protected $kernel; |
||
41 | |||
42 | /** |
||
43 | * @param string|null $basePath |
||
44 | */ |
||
45 | public function __construct($basePath = null) |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function setKernel(KernelInterface $kernel) |
||
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | final public function setBasePath($basePath) |
||
67 | |||
68 | /** |
||
69 | * {@inheritdoc} |
||
70 | */ |
||
71 | final public function getBasePath() |
||
75 | |||
76 | /** |
||
77 | * @Transform /^service$/ |
||
78 | * |
||
79 | * @throws ServiceNotFoundException |
||
80 | */ |
||
81 | public function castServiceIdToService($serviceId) |
||
85 | |||
86 | /** |
||
87 | * @Transform /^persister$/ |
||
88 | * |
||
89 | * @throws ServiceNotFoundException |
||
90 | */ |
||
91 | public function castServiceIdToPersister($serviceId) |
||
97 | |||
98 | /** |
||
99 | * {@inheritdoc} |
||
100 | */ |
||
101 | public function thereAreFixtures($fixturesFile, $persister = null) |
||
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | public function thereAreSeveralFixtures(TableNode $fixturesFileRows, $persister = null) |
||
119 | |||
120 | /** |
||
121 | * @param array $fixturesFiles |
||
122 | * @param PersisterInterface $persister |
||
123 | */ |
||
124 | private function loadFixtures($fixturesFiles, $persister = null) |
||
178 | |||
179 | /** |
||
180 | * @param Doctrine|PersisterInterface|null $persister |
||
181 | * |
||
182 | * @return PersisterInterface |
||
183 | * |
||
184 | * @throws \InvalidArgumentException |
||
185 | */ |
||
186 | final protected function resolvePersister($persister) |
||
205 | |||
206 | /** |
||
207 | * @return LoaderInterface |
||
208 | */ |
||
209 | protected function getLoader() |
||
213 | |||
214 | /** |
||
215 | * @return PersisterInterface |
||
216 | */ |
||
217 | abstract protected function getPersister(); |
||
218 | |||
219 | /** |
||
220 | * @return FixturesFinderInterface |
||
221 | */ |
||
222 | abstract protected function getFixturesFinder(); |
||
223 | } |
||
224 |