public function run(array &$world)
{
foreach ($this->steps as $step) {
if ($step instanceof PHPUnit_Extensions_Story_Given) {
$this->test->runGiven($world, $step->getAction(), $step->getArguments());
} else {
if ($step instanceof PHPUnit_Extensions_Story_When) {
$this->test->runWhen($world, $step->getAction(), $step->getArguments());
} else {
$this->test->runThen($world, $step->getAction(), $step->getArguments());
}
}
}
}
/** * Run this test's scenario. * * @throws RuntimeException */ protected function runTest() { parent::runTest(); $this->scenario->run($this->world); }