1 | <?php |
||
10 | abstract class AbstractController extends WebTestCase |
||
11 | { |
||
12 | protected static $options = [ |
||
13 | 'environment' => 'test', |
||
14 | 'debug' => true, |
||
15 | ]; |
||
16 | /** |
||
17 | * @var ContainerInterface |
||
18 | */ |
||
19 | protected $container; |
||
20 | /** |
||
21 | * @var EntityManager |
||
22 | */ |
||
23 | protected $em; |
||
24 | /** |
||
25 | * @var Client |
||
26 | */ |
||
27 | protected $client; |
||
28 | /** |
||
29 | * {@inheritDoc} |
||
30 | */ |
||
31 | public function __construct($name = null, array $data = [], $dataName = '') |
||
40 | |||
41 | |||
42 | /** |
||
43 | * @param string $path |
||
44 | * @param string $method |
||
45 | * @param int $expectedStatusCode |
||
46 | * |
||
47 | * @return \Symfony\Component\DomCrawler\Crawler |
||
48 | */ |
||
49 | protected function request($path, $method = 'GET', $expectedStatusCode = 200) |
||
65 | |||
66 | /** |
||
67 | * @param array $options |
||
68 | * @param array $server |
||
69 | * @return Client |
||
70 | */ |
||
71 | protected function getClient(array $options = array(), array $server = array()) |
||
78 | |||
79 | protected function logIn($username = '[email protected]', $password = 'admin') |
||
87 | } |
||
88 |