本文整理汇总了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());
}