1 | <?php |
||
28 | class VictoireWebTestCase extends WebTestCase |
||
29 | { |
||
30 | const VICTOIRE_FIREWALL = 'main'; |
||
31 | |||
32 | /** |
||
33 | * @var ContainerInterface |
||
34 | */ |
||
35 | protected $container; |
||
36 | |||
37 | /** |
||
38 | * @var ManagerRegistry |
||
39 | */ |
||
40 | protected $doctrine; |
||
41 | |||
42 | /** |
||
43 | * @var ObjectManager |
||
44 | */ |
||
45 | protected $entityManager; |
||
46 | |||
47 | /** |
||
48 | * Start tests by set up Kernel, Doctrine and Entity Manager. |
||
49 | */ |
||
50 | protected function setUp() |
||
55 | |||
56 | /** |
||
57 | * Drop and create database schema. |
||
58 | * |
||
59 | * @throws \Doctrine\ORM\Tools\ToolsException |
||
60 | */ |
||
61 | protected function resetSchema() |
||
69 | |||
70 | /** |
||
71 | * Victoire login. |
||
72 | * |
||
73 | * @param Client $client |
||
74 | * @param array $roles |
||
75 | */ |
||
76 | protected function logIn(Client $client, array $roles) |
||
87 | |||
88 | /** |
||
89 | * Load seeds fixtures and given fixtures. |
||
90 | * |
||
91 | * @param array $fixtures |
||
92 | */ |
||
93 | protected function loadFixtures(array $fixtures = []) |
||
109 | |||
110 | /** |
||
111 | * Reset Victoire ViewReferences. |
||
112 | */ |
||
113 | protected function resetViewsReference() |
||
118 | |||
119 | /** |
||
120 | * Set up Symfony Kernel and provide container. |
||
121 | */ |
||
122 | private function setUpSymfonyKernel() |
||
129 | |||
130 | /** |
||
131 | * Provide doctrine and entity manager. |
||
132 | */ |
||
133 | private function setUpDoctrine() |
||
138 | |||
139 | /** |
||
140 | * Get seeds files for Users, Pages and Templates. |
||
141 | * |
||
142 | * @return array |
||
143 | */ |
||
144 | private function getSeeds() |
||
152 | |||
153 | /** |
||
154 | * Returns all metadata by default. |
||
155 | * |
||
156 | * Override to only build selected metadata. |
||
157 | * Return an empty array to prevent building the schema. |
||
158 | * |
||
159 | * @return array |
||
160 | */ |
||
161 | private function getMetadata() |
||
165 | |||
166 | /** |
||
167 | * Override to build doctrine registry yourself. |
||
168 | * |
||
169 | * By default a Symfony container is used to create it. It requires the SymfonyKernel trait. |
||
170 | * |
||
171 | * @return ManagerRegistry |
||
172 | */ |
||
173 | private function createDoctrineRegistry() |
||
181 | } |
||
182 |
This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.
Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.