PHPUnit_Extensions_Story_Scenario::run PHP Method

run() public method

Runs this scenario.
public run ( array &$world )
$world array
    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());
                }
            }
        }
    }

Usage Example

Example #1
0
 /**
  * Run this test's scenario.
  *
  * @throws RuntimeException
  */
 protected function runTest()
 {
     parent::runTest();
     $this->scenario->run($this->world);
 }
All Usage Examples Of PHPUnit_Extensions_Story_Scenario::run