@@ 68-82 (lines=15) @@ | ||
65 | $object->match('/en/some-uri'); |
|
66 | } |
|
67 | ||
68 | private function getContainer($request, $multiLanguage = false, $nodeTranslation = null) |
|
69 | { |
|
70 | $container = $this->createMock('Symfony\Component\DependencyInjection\ContainerInterface'); |
|
71 | $serviceMap = array( |
|
72 | array('request_stack', 1, $this->getRequestStack($request)), |
|
73 | array('kunstmaan_admin.domain_configuration', 1, $this->getDomainConfiguration($multiLanguage)), |
|
74 | array('doctrine.orm.entity_manager', 1, $this->getEntityManager($nodeTranslation)), |
|
75 | ); |
|
76 | ||
77 | $container |
|
78 | ->method('get') |
|
79 | ->will($this->returnValueMap($serviceMap)); |
|
80 | ||
81 | return $container; |
|
82 | } |
|
83 | ||
84 | private function getRequestStack($request) |
|
85 | { |
@@ 186-201 (lines=16) @@ | ||
183 | * |
|
184 | * @return Container |
|
185 | */ |
|
186 | private function getContainer($request, $nodeTranslation = null) |
|
187 | { |
|
188 | $container = $this->createMock('Symfony\Component\DependencyInjection\ContainerInterface'); |
|
189 | $serviceMap = array( |
|
190 | array('request_stack', 1, $this->getRequestStack($request)), |
|
191 | array('kunstmaan_admin.domain_configuration', 1, $this->getDomainConfiguration()), |
|
192 | array('doctrine.orm.entity_manager', 1, $this->getEntityManager($nodeTranslation)), |
|
193 | ); |
|
194 | ||
195 | $container |
|
196 | ->method('get') |
|
197 | ->will($this->returnValueMap($serviceMap)); |
|
198 | ||
199 | /* @var Container $container */ |
|
200 | return $container; |
|
201 | } |
|
202 | ||
203 | private function getRequestStack($request) |
|
204 | { |