|
@@ 151-161 (lines=11) @@
|
| 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 |
|
$this->assertEquals($item, $builder['test']); |
| 160 |
|
$this->assertEquals(null, $builder['notFound']); |
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
public function testGetByIndex() |
| 164 |
|
{ |
|
@@ 163-173 (lines=11) @@
|
| 160 |
|
$this->assertEquals(null, $builder['notFound']); |
| 161 |
|
} |
| 162 |
|
|
| 163 |
|
public function testGetByIndex() |
| 164 |
|
{ |
| 165 |
|
$builder = $this->builderFactory(); |
| 166 |
|
|
| 167 |
|
$item = $builder->create('test', Link::class); |
| 168 |
|
|
| 169 |
|
$this->assertEquals($item, $builder->getByIndex(0)); |
| 170 |
|
$this->assertEquals(null, $builder->getByIndex(1)); |
| 171 |
|
$this->assertEquals($item, $builder[0]); |
| 172 |
|
$this->assertEquals(null, $builder[1]); |
| 173 |
|
} |
| 174 |
|
|
| 175 |
|
public function testHas() |
| 176 |
|
{ |