/** * @covers Pants\Project::execute */ public function testTasksAreExecutedBeforeTargets() { $task = $this->getMock('\\Pants\\Task\\Task'); $task->expects($this->once())->method('execute')->will($this->returnSelf()); $this->project->getTasks()->expects($this->once())->method('getIterator')->will($this->returnValue(new ArrayIterator(array($task)))); $this->project->execute(); }