PHP Class Eloquent\Phony\Event\EventOrderVerifier

Show file Open project: eloquent/phony

Public Methods

Method Description
__construct ( Eloquent\Phony\Assertion\AssertionRecorder $assertionRecorder, AssertionRenderer $assertionRenderer ) Construct a new event order verifier.
anyOrder ( ) : EventCollection Throws an exception unless at least one event is supplied.
anyOrderSequence ( mixed $events ) : EventCollection Throws an exception unless the supplied event sequence contains at least one event.
checkAnyOrder ( ) : EventCollection | null Checks that at least one event is supplied.
checkAnyOrderSequence ( mixed $events ) : EventCollection | null Checks if the supplied event sequence contains at least one event.
checkInOrder ( ) : EventCollection | null Checks if the supplied events happened in chronological order.
checkInOrderSequence ( mixed $events ) : EventCollection | null Checks if the supplied event sequence happened in chronological order.
inOrder ( ) : EventCollection Throws an exception unless the supplied events happened in chronological order.
inOrderSequence ( mixed $events ) : EventCollection Throws an exception unless the supplied event sequence happened in chronological order.
instance ( ) : EventOrderVerifier Get the static instance of this verifier.

Private Methods

Method Description
expectedEvents ( $events )
mergeEvents ( $events )

Method Details

__construct() public method

Construct a new event order verifier.
public __construct ( Eloquent\Phony\Assertion\AssertionRecorder $assertionRecorder, AssertionRenderer $assertionRenderer )
$assertionRecorder Eloquent\Phony\Assertion\AssertionRecorder The assertion recorder to use.
$assertionRenderer Eloquent\Phony\Assertion\AssertionRenderer The assertion renderer to use.

anyOrder() public method

Throws an exception unless at least one event is supplied.
public anyOrder ( ) : EventCollection
return EventCollection The result.

anyOrderSequence() public method

Throws an exception unless the supplied event sequence contains at least one event.
public anyOrderSequence ( mixed $events ) : EventCollection
$events mixed
return EventCollection The result.

checkAnyOrder() public method

Checks that at least one event is supplied.
public checkAnyOrder ( ) : EventCollection | null
return EventCollection | null The result.

checkAnyOrderSequence() public method

Checks if the supplied event sequence contains at least one event.
public checkAnyOrderSequence ( mixed $events ) : EventCollection | null
$events mixed
return EventCollection | null The result.

checkInOrder() public method

Checks if the supplied events happened in chronological order.
public checkInOrder ( ) : EventCollection | null
return EventCollection | null The result.

checkInOrderSequence() public method

Checks if the supplied event sequence happened in chronological order.
public checkInOrderSequence ( mixed $events ) : EventCollection | null
$events mixed
return EventCollection | null The result.

inOrder() public method

Throws an exception unless the supplied events happened in chronological order.
public inOrder ( ) : EventCollection
return EventCollection The result.

inOrderSequence() public method

Throws an exception unless the supplied event sequence happened in chronological order.
public inOrderSequence ( mixed $events ) : EventCollection
$events mixed
return EventCollection The result.

instance() public static method

Get the static instance of this verifier.
public static instance ( ) : EventOrderVerifier
return EventOrderVerifier The static verifier.