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