コード例 #1
0
ファイル: TargetTest.php プロジェクト: toxygene/pants
 /**
  * @covers Pants\Target\Target::__construct
  * @covers Pants\Target\Target::execute
  */
 public function testTasksAreNotExecutedIfIfIsNotSet()
 {
     $task = $this->getMock('\\Pants\\Task\\Task');
     $task->expects($this->never())->method('execute');
     $this->tasks->add($task);
     $this->target->setIf(array('one'))->execute();
 }
コード例 #2
0
ファイル: TasksTest.php プロジェクト: toxygene/pants
 /**
  * @covers Pants\Task\Tasks::add
  * @covers Pants\Task\Tasks::getIterator
  */
 public function testTasksCanBeAdded()
 {
     $task = $this->getMock('Pants\\Task\\Task');
     $this->tasks->add($task);
     $this->assertEquals(array($task), iterator_to_array($this->tasks));
 }