1 | <?php |
||
30 | abstract class WebTestCase extends BaseWebTestCase |
||
31 | { |
||
32 | /** |
||
33 | * @var Application |
||
34 | * |
||
35 | * application |
||
36 | */ |
||
37 | protected static $application; |
||
38 | |||
39 | /** |
||
40 | * @var Client |
||
41 | * |
||
42 | * Client |
||
43 | */ |
||
44 | protected $client; |
||
45 | |||
46 | /** |
||
47 | * @todo [BC Break] Replace the non-static property with this one. |
||
48 | * @var Client |
||
49 | */ |
||
50 | private static $_client; |
||
51 | |||
52 | /** |
||
53 | * @var ContainerInterface |
||
54 | * |
||
55 | * Container |
||
56 | */ |
||
57 | protected $container; |
||
58 | |||
59 | /** |
||
60 | * Set up |
||
61 | */ |
||
62 | public function setUp() |
||
84 | |||
85 | /** |
||
86 | * Tear down |
||
87 | */ |
||
88 | public function tearDown() |
||
107 | |||
108 | /** |
||
109 | * Load fixtures of these bundles |
||
110 | * |
||
111 | * @return boolean|array Bundles name where fixtures should be found |
||
112 | */ |
||
113 | protected function loadBundlesFixtures() |
||
117 | |||
118 | /** |
||
119 | * @return array |
||
120 | */ |
||
121 | protected function getKernelOptions() |
||
125 | |||
126 | /** |
||
127 | * @return array An array of server parameters to pass to the test client |
||
128 | */ |
||
129 | protected function getServerParameters() |
||
133 | |||
134 | /** |
||
135 | * Schema must be loaded in all test cases |
||
136 | * |
||
137 | * @return boolean Load schema |
||
138 | */ |
||
139 | protected function loadSchema() |
||
143 | |||
144 | /** |
||
145 | * Should schema be loaded quietly |
||
146 | */ |
||
147 | protected function runCommandsQuietly() |
||
151 | |||
152 | /** |
||
153 | * Creates schema |
||
154 | * |
||
155 | * Only creates schema if loadSchema() is set to true. |
||
156 | * All other methods will be loaded if this one is loaded. |
||
157 | * |
||
158 | * Otherwise, will return. |
||
159 | * |
||
160 | * @return $this self Object |
||
161 | */ |
||
162 | protected function createSchema() |
||
194 | |||
195 | /** |
||
196 | * load fixtures method |
||
197 | * |
||
198 | * This method is only called if create Schema is set to true |
||
199 | * |
||
200 | * Only load fixtures if loadFixtures() is set to true. |
||
201 | * All other methods will be loaded if this one is loaded. |
||
202 | * |
||
203 | * Otherwise, will return. |
||
204 | * |
||
205 | * @return $this self Object |
||
206 | */ |
||
207 | protected function loadFixtures() |
||
232 | |||
233 | protected static function getBundleAndTestCaseName() |
||
255 | |||
256 | /** |
||
257 | * Attempts to guess the kernel location. |
||
258 | * |
||
259 | * When the Kernel is located, the file is required. |
||
260 | * |
||
261 | * @return string The Kernel class name |
||
262 | * |
||
263 | * @throws \RuntimeException |
||
264 | */ |
||
265 | protected static function getKernelClass() |
||
283 | |||
284 | /** |
||
285 | * Creates a Client. |
||
286 | * |
||
287 | * @param array $options An array of options to pass to the createKernel class |
||
288 | * @param array $server An array of server parameters |
||
289 | * |
||
290 | * @return Client A Client instance |
||
291 | */ |
||
292 | protected static function createClient(array $options = array(), array $server = array()) |
||
296 | |||
297 | /** |
||
298 | * Creates a Kernel. |
||
299 | * |
||
300 | * Available options: |
||
301 | * |
||
302 | * * environment |
||
303 | * * debug |
||
304 | * |
||
305 | * @param array $options An array of options |
||
306 | * |
||
307 | * @return KernelInterface A KernelInterface instance |
||
308 | */ |
||
309 | protected static function createKernel(array $options = array()) |
||
323 | } |
||
324 |
This check looks for a call to a parent method whose name is different than the method from which it is called.
Consider the following code:
The
getFirstName()
method in theSon
calls the wrong method in the parent class.