@@ 100-110 (lines=11) @@ | ||
97 | } |
|
98 | ||
99 | ||
100 | public function testGetLowestTopChild() |
|
101 | { |
|
102 | $this->stack->expects($this->atLeastOnce()) |
|
103 | ->method('getCurrentRequest') |
|
104 | ->willReturn(new Request([],[],['_route' => 'KunstmaanAdminBundle_settings'])); |
|
105 | $this->authCheck->expects($this->any())->method('isGranted')->willReturn(true); |
|
106 | $adapter = new SettingsMenuAdaptor($this->authCheck, true); |
|
107 | $this->object->addAdaptMenu($adapter); |
|
108 | $lowest = $this->object->getLowestTopChild(); |
|
109 | $this->assertInstanceOf(TopMenuItem::class, $lowest); |
|
110 | } |
|
111 | ||
112 | /** |
|
113 | * @throws \ReflectionException |
|
@@ 153-164 (lines=12) @@ | ||
150 | } |
|
151 | ||
152 | ||
153 | public function testModulesMenuAdaptor() |
|
154 | { |
|
155 | $this->stack->expects($this->atLeastOnce()) |
|
156 | ->method('getCurrentRequest') |
|
157 | ->willReturn(new Request([],[],['_route' => 'KunstmaanAdminBundle_modules'])); |
|
158 | ||
159 | $this->authCheck->expects($this->any())->method('isGranted')->willReturn(true); |
|
160 | $adapter = new ModulesMenuAdaptor(); |
|
161 | $this->object->addAdaptMenu($adapter); |
|
162 | $current = $this->object->getCurrent(); |
|
163 | $this->assertInstanceOf(TopMenuItem::class, $current); |
|
164 | } |
|
165 | ||
166 | /** |
|
167 | * @throws \ReflectionException |