public function isAncestor(ItemInterface $item, $depth = null) { return $this->matcher->isAncestor($item, $depth); }
public function testIsAncestor() { $menu = $this->getMock('Knp\\Menu\\ItemInterface'); $matcherMock = $this->getMatcherMock(); $matcherMock->expects($this->any())->method('isAncestor')->with($menu)->will($this->returnValue(false)); $helper = new MenuHelper($this->getHelperMock(), $matcherMock, $this->getManipulatorMock()); $this->assertFalse($helper->isAncestor($menu)); }