PHP Class Kraken\Test\Simulation\Simulation

Inheritance: extends Kraken\Event\BaseEventEmitter, implements Kraken\Test\Simulation\SimulationInterface
Show file Open project: kraken-php/framework Class Usage Examples

Public Methods

Method Description
__construct ( Kraken\Loop\LoopExtendedInterface $loop )
__destruct ( )
assertSame ( mixed $expected, mixed $actual, string $message = "Assertion failed, expected "%s" got "%s"" )
begin ( )
done ( )
expect ( string $name, mixed $data = [] )
fail ( $message )
getExpectations ( ) : Event[]
getLoop ( ) : Kraken\Loop\LoopInterface
getScenario ( ) : callable(SimulationInterface) | null
onStart ( callable $callable )
onStop ( callable $callable )
reflect ( string $model, mixed[] $config = [] ) : object
setScenario ( callable $scenario )

Private Methods

Method Description
start ( )
stop ( )

Method Details

__construct() public method

public __construct ( Kraken\Loop\LoopExtendedInterface $loop )
$loop Kraken\Loop\LoopExtendedInterface

__destruct() public method

public __destruct ( )

assertSame() public method

public assertSame ( mixed $expected, mixed $actual, string $message = "Assertion failed, expected "%s" got "%s"" )
$expected mixed
$actual mixed
$message string

begin() public method

public begin ( )

done() public method

public done ( )

expect() public method

public expect ( string $name, mixed $data = [] )
$name string
$data mixed

fail() public method

public fail ( $message )

getExpectations() public method

public getExpectations ( ) : Event[]
return Event[]

getLoop() public method

public getLoop ( ) : Kraken\Loop\LoopInterface
return Kraken\Loop\LoopInterface

getScenario() public method

public getScenario ( ) : callable(SimulationInterface) | null
return callable(SimulationInterface) | null

onStart() public method

public onStart ( callable $callable )
$callable callable

onStop() public method

public onStop ( callable $callable )
$callable callable

reflect() public method

public reflect ( string $model, mixed[] $config = [] ) : object
$model string
$config mixed[]
return object

setScenario() public method

public setScenario ( callable $scenario )
$scenario callable