PHPUnit_Extensions_Story_Scenario::_and PHP Method

_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
    public function _and($arguments)
    {
        $lastCalledStepClass = get_class($this->steps[count($this->steps) - 1]);
        return $this->addStep(new $lastCalledStepClass($arguments));
    }

Usage Example

Example #1
0
 /**
  * Add another step of the same type as the step that was added before.
  *
  * @param  array $arguments
  * @return PHPUnit_Extensions_Story_TestCase
  */
 protected function _and($contextOrOutcome)
 {
     return $this->scenario->_and(func_get_args());
 }