コード例 #1
0
ファイル: Scenario.php プロジェクト: itillawarra/cmfive
 public function runStep(Step $step)
 {
     $this->steps[] = $step;
     $result = $this->test->runStep($step);
     $step->executed = true;
     return $result;
 }
コード例 #2
0
ファイル: Scenario.php プロジェクト: BatVane/Codeception
 public function run()
 {
     foreach ($this->steps as $k => $step) {
         $this->currentStep = $k;
         $this->test->runStep($step);
     }
 }
コード例 #3
0
ファイル: Scenario.php プロジェクト: pfz/codeception
 public function runStep()
 {
     if (empty($this->steps)) {
         return;
     }
     $step = $this->lastStep();
     if (!$step->executed) {
         $result = $this->test->runStep($step);
         $this->currentStep++;
         $step->executed = true;
         return $result;
     }
 }
コード例 #4
0
ファイル: TestCaseTest.php プロジェクト: hitechdk/Codeception
 /**
  * @group core
  */
 public function testRunStep()
 {
     $assertions =& $this->moduleContainer->getModule('EmulateModuleHelper')->assertions;
     $step = new \Codeception\Step\Action('seeEquals', array(5, 5));
     $this->testcase->runStep($step);
     $this->assertEquals(1, $assertions);
     $step = new \Codeception\Step\Action('seeEquals', array(5, 6));
     try {
         $this->testcase->runStep($step);
     } catch (Exception $e) {
         $this->assertInstanceOf('PHPUnit_Framework_ExpectationFailedException', $e);
     }
     $this->assertEquals(1, $assertions);
 }
コード例 #5
0
ファイル: TestCaseTest.php プロジェクト: BatVane/Codeception
 public function testRunStepAddsTrace()
 {
     $step = new \Codeception\Step\Action(array('seeEquals', 5, 5));
     $this->testcase->runStep($step);
     $this->assertContains($step, $this->testcase->getTrace());
 }