PHP Class PHPSpec2\Runner\Runner

Show file Open project: phpspec/phpspec2

Public Methods

Method Description
__construct ( Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher, MatchersCollection $matchers, PHPSpec2\Mocker\MockerInterface $mocker, ArgumentsUnwrapper $unwrapper )
errorHandler ( integer $level, string $message, string $file, integer $line ) : boolean Custom error handler.
getEventDispatcher ( )
runExample ( Example $example )
runSpecification ( Specification $specification )

Protected Methods

Method Description
createContext ( Example $example )
createMockProphet ( $subject = null )
getExampleDependencies ( Example $example, $context )

Private Methods

Method Description
getDependencies ( ReflectionFunctionAbstract $function, array $dependencies )
invoke ( $context, ReflectionFunctionAbstract $function, array $dependencies )

Method Details

__construct() public method

public __construct ( Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher, MatchersCollection $matchers, PHPSpec2\Mocker\MockerInterface $mocker, ArgumentsUnwrapper $unwrapper )
$dispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$matchers PHPSpec2\Matcher\MatchersCollection
$mocker PHPSpec2\Mocker\MockerInterface
$unwrapper PHPSpec2\Wrapper\ArgumentsUnwrapper

createContext() protected method

protected createContext ( Example $example )
$example PHPSpec2\Loader\Node\Example

createMockProphet() protected method

protected createMockProphet ( $subject = null )

errorHandler() final public method

This method used as custom error handler when step is running.
See also: set_error_handler()
final public errorHandler ( integer $level, string $message, string $file, integer $line ) : boolean
$level integer
$message string
$file string
$line integer
return boolean

getEventDispatcher() public method

public getEventDispatcher ( )

getExampleDependencies() protected method

protected getExampleDependencies ( Example $example, $context )
$example PHPSpec2\Loader\Node\Example

runExample() public method

public runExample ( Example $example )
$example PHPSpec2\Loader\Node\Example

runSpecification() public method

public runSpecification ( Specification $specification )
$specification PHPSpec2\Loader\Node\Specification