1 | <?php |
||
20 | class BaseTestKernel extends Kernel implements TestKernelInterface |
||
21 | { |
||
22 | /** |
||
23 | * Directory name where kernel configs are stored |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $testCase; |
||
28 | |||
29 | /** |
||
30 | * Root directory of the kernel. Contains testCase directories |
||
31 | * |
||
32 | * @var string |
||
33 | */ |
||
34 | protected $rootConfig; |
||
35 | |||
36 | /** |
||
37 | * Name of the application config |
||
38 | * |
||
39 | * @var string |
||
40 | */ |
||
41 | protected $configDir; |
||
42 | |||
43 | /** |
||
44 | * Raw kernel name used for generating kernel directories (cache, logs etc) |
||
45 | * General name should contain information about test case in order to |
||
46 | * generate unique cache classes for all th test cases |
||
47 | * |
||
48 | * @var string |
||
49 | */ |
||
50 | protected $rawName; |
||
51 | |||
52 | /** |
||
53 | * If $rootDir is not provided, it would be set to $configDir |
||
54 | * Attention! If $rootDir is provided but is not exists, it would be created |
||
55 | * just like cacheDir and logDir |
||
56 | * |
||
57 | * {@inheritdoc} |
||
58 | */ |
||
59 | public function setTestKernelConfiguration($appName, $testCase, $configDir, $rootConfig, $rootDir = false) |
||
83 | |||
84 | /** |
||
85 | * Sets kernel root directory |
||
86 | * |
||
87 | * @param string $rootDir kernel root dir |
||
88 | * |
||
89 | * @throws \RuntimeException if directory does not exist and can not be created |
||
90 | * |
||
91 | * @return void |
||
92 | */ |
||
93 | protected function setRootDir($rootDir) |
||
102 | |||
103 | /** |
||
104 | * {@inheritdoc} |
||
105 | */ |
||
106 | public function getRootDir() |
||
110 | |||
111 | /** |
||
112 | * Returns base bundle list |
||
113 | * |
||
114 | * @return array |
||
115 | */ |
||
116 | protected function getBaseBundles() |
||
122 | |||
123 | /** |
||
124 | * {@inheritdoc} |
||
125 | */ |
||
126 | public function registerBundles() |
||
135 | |||
136 | /** |
||
137 | * {@inheritdoc} |
||
138 | */ |
||
139 | public function init() |
||
142 | |||
143 | /** |
||
144 | * {@inheritdoc} |
||
145 | */ |
||
146 | public function getCacheDir() |
||
150 | |||
151 | /** |
||
152 | * {@inheritdoc} |
||
153 | */ |
||
154 | public function getLogDir() |
||
158 | |||
159 | /** |
||
160 | * {@inheritdoc} |
||
161 | */ |
||
162 | public function getTempAppDir() |
||
166 | |||
167 | /** |
||
168 | * {@inheritdoc} |
||
169 | */ |
||
170 | public function registerContainerConfiguration(LoaderInterface $loader) |
||
174 | |||
175 | /** |
||
176 | * {@inheritdoc} |
||
177 | */ |
||
178 | public function serialize() |
||
190 | |||
191 | /** |
||
192 | * {@inheritdoc} |
||
193 | */ |
||
194 | public function unserialize($str) |
||
200 | |||
201 | /** |
||
202 | * {@inheritdoc} |
||
203 | */ |
||
204 | protected function getKernelParameters() |
||
213 | } |
||
214 |
This check looks at variables that have been passed in as parameters and are passed out again to other methods.
If the outgoing method call has stricter type requirements than the method itself, an issue is raised.
An additional type check may prevent trouble.