PHP Class PHPUnit_Extensions_Story_Scenario, qcodo

Author: Mattis Stordalen Flister ([email protected])
Author: Sebastian Bergmann ([email protected])
Show file Open project: qcodo/qcodo Class Usage Examples

Protected Properties

Property Type Description
$lastCalledMethod string
$steps array
$test PHPUnit_Extensions_Story_TestCase

Public Methods

Method Description
__construct ( $test ) Constructor.
_and ( array $arguments ) : PHPUnit_Extensions_Story_TestCase Add another step of the same type as the step that was added before.
getSteps ( ) : array Returns the steps of this scenario.
given ( array $arguments ) : PHPUnit_Extensions_Story_TestCase Adds a "Given" step to the scenario.
run ( array &$world ) Runs this scenario.
then ( array $arguments ) : PHPUnit_Extensions_Story_TestCase Adds a "Then" step to the scenario.
when ( array $arguments ) : PHPUnit_Extensions_Story_TestCase Adds a "When" step to the scenario.

Protected Methods

Method Description
addStep ( PHPUnit_Extensions_Story_Step $step ) : PHPUnit_Extensions_Story_TestCase Adds a step to the scenario.

Method Details

__construct() public method

Constructor.
public __construct ( $test )

_and() public method

Add another step of the same type as the step that was added before.
public _and ( array $arguments ) : PHPUnit_Extensions_Story_TestCase
$arguments array
return PHPUnit_Extensions_Story_TestCase

addStep() protected method

Adds a step to the scenario.
protected addStep ( PHPUnit_Extensions_Story_Step $step ) : PHPUnit_Extensions_Story_TestCase
$step PHPUnit_Extensions_Story_Step
return PHPUnit_Extensions_Story_TestCase

getSteps() public method

Returns the steps of this scenario.
public getSteps ( ) : array
return array

given() public method

Adds a "Given" step to the scenario.
public given ( array $arguments ) : PHPUnit_Extensions_Story_TestCase
$arguments array
return PHPUnit_Extensions_Story_TestCase

run() public method

Runs this scenario.
public run ( array &$world )
$world array

then() public method

Adds a "Then" step to the scenario.
public then ( array $arguments ) : PHPUnit_Extensions_Story_TestCase
$arguments array
return PHPUnit_Extensions_Story_TestCase

when() public method

Adds a "When" step to the scenario.
public when ( array $arguments ) : PHPUnit_Extensions_Story_TestCase
$arguments array
return PHPUnit_Extensions_Story_TestCase

Property Details

$lastCalledMethod protected property

protected string $lastCalledMethod
return string

$steps protected property

protected array $steps
return array

$test protected property

protected PHPUnit_Extensions_Story_TestCase $test
return PHPUnit_Extensions_Story_TestCase