本文整理匯總了PHP中Codeception\TestCase::runStep方法的典型用法代碼示例。如果您正苦於以下問題:PHP TestCase::runStep方法的具體用法?PHP TestCase::runStep怎麽用?PHP TestCase::runStep使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Codeception\TestCase
的用法示例。
在下文中一共展示了TestCase::runStep方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: runStep
public function runStep(Step $step)
{
$this->steps[] = $step;
$result = $this->test->runStep($step);
$step->executed = true;
return $result;
}
示例2: run
public function run()
{
foreach ($this->steps as $k => $step) {
$this->currentStep = $k;
$this->test->runStep($step);
}
}
示例3: runStep
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: testRunStep
/**
* @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: testRunStepAddsTrace
public function testRunStepAddsTrace()
{
$step = new \Codeception\Step\Action(array('seeEquals', 5, 5));
$this->testcase->runStep($step);
$this->assertContains($step, $this->testcase->getTrace());
}