/**
  * @covers Kunstmaan\AdminBundle\Helper\Menu\MenuItem::getTopChildren
  */
 public function testGetTopChildren()
 {
     $child1 = new MenuItem($this->object->getMenu());
     $child2 = new TopMenuItem($this->object->getMenu());
     $children = array($child1, $child2);
     $menuBuilder = $this->getMockBuilder('Kunstmaan\\AdminBundle\\Helper\\Menu\\MenuBuilder')->disableOriginalConstructor()->getMock();
     $menuBuilder->expects($this->once())->method('getChildren')->will($this->returnValue($children));
     /* @var $menuBuilder MenuBuilder */
     $parent = new MenuItem($menuBuilder);
     $result = $parent->getTopChildren();
     $this->assertEquals(1, count($result));
     $this->assertEquals(array($child2), $result);
 }