public function testCompositeItem() { $item = new Item('Foo', '/foo', [new Item('Bar', '/bar'), new Item('Baz')]); $this->assertSame('Foo', $item->getLabel()); $this->assertSame('/foo', $item->getLink()); $this->assertCount(2, $item->getItems()); $this->assertTrue($item->hasItems()); }