Beispiel #1
0
 /**
  * @covers Pants\Target\Target::__construct
  * @covers Pants\Target\Target::execute
  */
 public function testTasksAreNotExecutedIfUnlessIsSet()
 {
     $task = $this->getMock('\\Pants\\Task\\Task');
     $task->expects($this->never())->method('execute');
     $this->tasks->expects($this->any())->method('getIterator')->will($this->returnValue(new ArrayIterator(array($task))));
     $this->properties->expects($this->once())->method('__get')->with('one')->will($this->returnValue(true));
     $this->target->setUnless(array('one'))->execute();
 }