PHP Class Eloquent\Phony\Verification\AbstractCardinalityVerifierEventCollection

Inheritance: implements Eloquent\Phony\Verification\CardinalityVerifier, implements Eloquent\Phony\Event\EventCollection
Afficher le fichier Open project: eloquent/phony Class Usage Examples

Protected Properties

Свойство Type Description
$callCount
$callVerifierFactory
$calls
$cardinality
$eventCount
$events

Méthodes publiques

Méthode Description
__construct ( array $events, CallVerifierFactory $callVerifierFactory ) Construct a new cardinality verifier event collection.
allCalls ( ) : array Get all calls as an array.
allEvents ( ) : array Get all events as an array.
always ( ) Requires that the next verification matches for all possible items.
atLeast ( integer $minimum ) Requires that the next verification matches a number of times greater than or equal to $minimum.
atMost ( integer $maximum ) Requires that the next verification matches a number of times less than or equal to $maximum.
between ( integer $minimum, integer | null $maximum ) Requires that the next verification matches a number of times greater than or equal to $minimum, and less than or equal to $maximum.
callAt ( integer $index ) : Eloquent\Phony\Call\Call Get a call by index.
callCount ( ) : integer Get the number of calls.
cardinality ( ) : Cardinality Get the cardinality.
count ( ) : integer Get the event count.
eventAt ( integer $index ) : Eloquent\Phony\Event\Event Get an event by index.
eventCount ( ) : integer Get the number of events.
firstCall ( ) : Eloquent\Phony\Call\Call Get the first call.
firstEvent ( ) : Eloquent\Phony\Event\Event Get the first event.
getIterator ( ) : Iterator Get an iterator for this collection.
hasCalls ( ) : boolean Returns true if this collection contains any calls.
hasEvents ( ) : boolean Returns true if this collection contains any events.
lastCall ( ) : Eloquent\Phony\Call\Call Get the last call.
lastEvent ( ) : Eloquent\Phony\Event\Event Get the last event.
never ( ) Requires that the next verification never matches.
once ( ) Requires that the next verification matches only once.
resetCardinality ( ) : Cardinality Reset the cardinality to its default value.
thrice ( ) Requires that the next verification matches exactly three times.
times ( integer $times ) Requires that the next verification matches an exact number of times.
twice ( ) Requires that the next verification matches exactly two times.

Private Methods

Méthode Description
normalizeIndex ( $size, $index, &$normalized = null )

Method Details

__construct() public méthode

Construct a new cardinality verifier event collection.
public __construct ( array $events, CallVerifierFactory $callVerifierFactory )
$events array
$callVerifierFactory Eloquent\Phony\Call\CallVerifierFactory The call verifier factory to use.

allCalls() public méthode

Get all calls as an array.
public allCalls ( ) : array
Résultat array

allEvents() public méthode

Get all events as an array.
public allEvents ( ) : array
Résultat array

always() public méthode

Requires that the next verification matches for all possible items.
public always ( )

atLeast() public méthode

Requires that the next verification matches a number of times greater than or equal to $minimum.
public atLeast ( integer $minimum )
$minimum integer The minimum match count.

atMost() public méthode

Requires that the next verification matches a number of times less than or equal to $maximum.
public atMost ( integer $maximum )
$maximum integer The maximum match count.

between() public méthode

Requires that the next verification matches a number of times greater than or equal to $minimum, and less than or equal to $maximum.
public between ( integer $minimum, integer | null $maximum )
$minimum integer The minimum match count.
$maximum integer | null The maximum match count, or null for no maximum.

callAt() public méthode

Negative indices are offset from the end of the list. That is, -1 indicates the last element, and -2 indicates the second last element.
public callAt ( integer $index ) : Eloquent\Phony\Call\Call
$index integer The index.
Résultat Eloquent\Phony\Call\Call The call.

callCount() public méthode

Get the number of calls.
public callCount ( ) : integer
Résultat integer The call count.

cardinality() public méthode

Get the cardinality.
public cardinality ( ) : Cardinality
Résultat Cardinality The cardinality.

count() public méthode

Get the event count.
public count ( ) : integer
Résultat integer The event count.

eventAt() public méthode

Negative indices are offset from the end of the list. That is, -1 indicates the last element, and -2 indicates the second last element.
public eventAt ( integer $index ) : Eloquent\Phony\Event\Event
$index integer The index.
Résultat Eloquent\Phony\Event\Event The event.

eventCount() public méthode

Get the number of events.
public eventCount ( ) : integer
Résultat integer The event count.

firstCall() public méthode

Get the first call.
public firstCall ( ) : Eloquent\Phony\Call\Call
Résultat Eloquent\Phony\Call\Call The call.

firstEvent() public méthode

Get the first event.
public firstEvent ( ) : Eloquent\Phony\Event\Event
Résultat Eloquent\Phony\Event\Event The event.

getIterator() public méthode

Get an iterator for this collection.
public getIterator ( ) : Iterator
Résultat Iterator The iterator.

hasCalls() public méthode

Returns true if this collection contains any calls.
public hasCalls ( ) : boolean
Résultat boolean True if this collection contains any calls.

hasEvents() public méthode

Returns true if this collection contains any events.
public hasEvents ( ) : boolean
Résultat boolean True if this collection contains any events.

lastCall() public méthode

Get the last call.
public lastCall ( ) : Eloquent\Phony\Call\Call
Résultat Eloquent\Phony\Call\Call The call.

lastEvent() public méthode

Get the last event.
public lastEvent ( ) : Eloquent\Phony\Event\Event
Résultat Eloquent\Phony\Event\Event The event.

never() public méthode

Requires that the next verification never matches.
public never ( )

once() public méthode

Requires that the next verification matches only once.
public once ( )

resetCardinality() public méthode

Reset the cardinality to its default value.
public resetCardinality ( ) : Cardinality
Résultat Cardinality The current cardinality.

thrice() public méthode

Requires that the next verification matches exactly three times.
public thrice ( )

times() public méthode

Requires that the next verification matches an exact number of times.
public times ( integer $times )
$times integer The match count.

twice() public méthode

Requires that the next verification matches exactly two times.
public twice ( )

Property Details

$callCount protected_oe property

protected $callCount

$callVerifierFactory protected_oe property

protected $callVerifierFactory

$calls protected_oe property

protected $calls

$cardinality protected_oe property

protected $cardinality

$eventCount protected_oe property

protected $eventCount

$events protected_oe property

protected $events