public function runStep(Step $step) { $this->steps[] = $step; $result = $this->test->runStep($step); $step->executed = true; return $result; }
public function run() { foreach ($this->steps as $k => $step) { $this->currentStep = $k; $this->test->runStep($step); } }
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; } }
/** * @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); }
public function testRunStepAddsTrace() { $step = new \Codeception\Step\Action(array('seeEquals', 5, 5)); $this->testcase->runStep($step); $this->assertContains($step, $this->testcase->getTrace()); }