1 | <?php |
||
11 | abstract class AbstractController extends WebTestCase |
||
12 | { |
||
13 | protected static $options = [ |
||
14 | 'environment' => 'test', |
||
15 | 'debug' => true, |
||
16 | ]; |
||
17 | protected $em; |
||
18 | protected $sessionClient; |
||
19 | |||
20 | /** |
||
21 | * {@inheritDoc} |
||
22 | */ |
||
23 | protected function setUp(): void |
||
27 | |||
28 | /** |
||
29 | * @return EntityManager |
||
30 | */ |
||
31 | public function getEm() |
||
39 | |||
40 | protected function dump($content, $destination = '/var/www/test.html') |
||
45 | |||
46 | /** |
||
47 | * @param string $path |
||
48 | * @param string $method |
||
49 | * @param int $expectedStatusCode |
||
50 | * |
||
51 | * @return \Symfony\Component\DomCrawler\Crawler |
||
52 | */ |
||
53 | protected function request($path, $method = 'GET', $expectedStatusCode = 200, array $headers = []) |
||
67 | |||
68 | protected function restRequest(string $path, string $method = 'GET', int $expectedStatusCode = 200) |
||
72 | |||
73 | /** |
||
74 | * Selects form by a button by name or alt value for images. |
||
75 | * |
||
76 | * @param Crawler $pageObject |
||
77 | * @return \Symfony\Component\DomCrawler\Form |
||
78 | */ |
||
79 | protected function getConfirmDeleteFormObject(Crawler $pageObject) |
||
83 | |||
84 | protected function getSessionClient(array $options = array(), array $server = array()) |
||
92 | |||
93 | /** |
||
94 | * @return \Symfony\Component\DependencyInjection\ContainerInterface |
||
95 | */ |
||
96 | public function getContainer() |
||
100 | |||
101 | protected function getHttpHost() |
||
108 | |||
109 | protected function logIn($username = 'admin', $password = 'admin') |
||
118 | } |
||
119 |