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 = '') |
||
44 | |||
45 | public function __destruct() |
||
49 | |||
50 | /** |
||
51 | * @param string $path |
||
52 | * @param string $method |
||
53 | * @param int $expectedStatusCode |
||
54 | * |
||
55 | * @return \Symfony\Component\DomCrawler\Crawler |
||
56 | */ |
||
57 | protected function request($path, $method = 'GET', $expectedStatusCode = 200) |
||
73 | |||
74 | /** |
||
75 | * @param array $options |
||
76 | * @param array $server |
||
77 | * @return Client |
||
78 | */ |
||
79 | protected function getClient(array $options = array(), array $server = array()) |
||
86 | |||
87 | protected function logIn($username = '[email protected]', $password = 'admin') |
||
95 | } |
||
96 |