/** * @covers Pants\Target\Targets::getDescriptions */ public function testHiddenTargetsAreNotAddedToDescriptions() { $target = $this->getMockBuilder('\\Pants\\Target\\Target')->disableOriginalConstructor()->getMock(); $target->expects($this->once())->method('getName')->will($this->returnValue('test')); $target->expects($this->once())->method('getHidden')->will($this->returnValue(true)); $target->expects($this->never())->method('getDescription'); $this->targets->add($target); $this->assertEquals(array(), $this->targets->getDescriptions()); }