@@ 151-159 (lines=9) @@ | ||
148 | $builder->create('index', SubMenu::class); // Duplicate |
|
149 | } |
|
150 | ||
151 | public function testGet() |
|
152 | { |
|
153 | $builder = $this->builderFactory(); |
|
154 | ||
155 | $item = $builder->create('test', Link::class); |
|
156 | ||
157 | $this->assertEquals($item, $builder->get('test')); |
|
158 | $this->assertEquals(null, $builder->get('notFound')); |
|
159 | } |
|
160 | ||
161 | public function testGetByIndex() |
|
162 | { |
|
@@ 161-169 (lines=9) @@ | ||
158 | $this->assertEquals(null, $builder->get('notFound')); |
|
159 | } |
|
160 | ||
161 | public function testGetByIndex() |
|
162 | { |
|
163 | $builder = $this->builderFactory(); |
|
164 | ||
165 | $item = $builder->create('test', Link::class); |
|
166 | ||
167 | $this->assertEquals($item, $builder->getByIndex(0)); |
|
168 | $this->assertEquals(null, $builder->getByIndex(1)); |
|
169 | } |
|
170 | ||
171 | public function testHas() |
|
172 | { |
|
@@ 187-194 (lines=8) @@ | ||
184 | $this->assertAttributeEquals(Builder::OL, 'type', $builder); |
|
185 | } |
|
186 | ||
187 | public function testAll() |
|
188 | { |
|
189 | $builder = $this->builderFactory(); |
|
190 | ||
191 | $this->assertEquals([], $builder->all()); |
|
192 | $item = $builder->create('test', Link::class); |
|
193 | $this->assertEquals(['test' => $item], $builder->all()); |
|
194 | } |
|
195 | ||
196 | public function testForget() |
|
197 | { |