PHP Класс Eloquent\Phony\Verification\AbstractCardinalityVerifierEventCollection

Наследование: implements Eloquent\Phony\Verification\CardinalityVerifier, implements Eloquent\Phony\Event\EventCollection
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$callCount
$callVerifierFactory
$calls
$cardinality
$eventCount
$events

Открытые методы

Метод Описание
__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.

Приватные методы

Метод Описание
normalizeIndex ( $size, $index, &$normalized = null )

Описание методов

__construct() публичный Метод

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() публичный Метод

Get all calls as an array.
public allCalls ( ) : array
Результат array

allEvents() публичный Метод

Get all events as an array.
public allEvents ( ) : array
Результат array

always() публичный Метод

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

atLeast() публичный Метод

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() публичный Метод

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() публичный Метод

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() публичный Метод

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.
Результат Eloquent\Phony\Call\Call The call.

callCount() публичный Метод

Get the number of calls.
public callCount ( ) : integer
Результат integer The call count.

cardinality() публичный Метод

Get the cardinality.
public cardinality ( ) : Cardinality
Результат Cardinality The cardinality.

count() публичный Метод

Get the event count.
public count ( ) : integer
Результат integer The event count.

eventAt() публичный Метод

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.
Результат Eloquent\Phony\Event\Event The event.

eventCount() публичный Метод

Get the number of events.
public eventCount ( ) : integer
Результат integer The event count.

firstCall() публичный Метод

Get the first call.
public firstCall ( ) : Eloquent\Phony\Call\Call
Результат Eloquent\Phony\Call\Call The call.

firstEvent() публичный Метод

Get the first event.
public firstEvent ( ) : Eloquent\Phony\Event\Event
Результат Eloquent\Phony\Event\Event The event.

getIterator() публичный Метод

Get an iterator for this collection.
public getIterator ( ) : Iterator
Результат Iterator The iterator.

hasCalls() публичный Метод

Returns true if this collection contains any calls.
public hasCalls ( ) : boolean
Результат boolean True if this collection contains any calls.

hasEvents() публичный Метод

Returns true if this collection contains any events.
public hasEvents ( ) : boolean
Результат boolean True if this collection contains any events.

lastCall() публичный Метод

Get the last call.
public lastCall ( ) : Eloquent\Phony\Call\Call
Результат Eloquent\Phony\Call\Call The call.

lastEvent() публичный Метод

Get the last event.
public lastEvent ( ) : Eloquent\Phony\Event\Event
Результат Eloquent\Phony\Event\Event The event.

never() публичный Метод

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

once() публичный Метод

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

resetCardinality() публичный Метод

Reset the cardinality to its default value.
public resetCardinality ( ) : Cardinality
Результат Cardinality The current cardinality.

thrice() публичный Метод

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

times() публичный Метод

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

twice() публичный Метод

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

Описание свойств

$callCount защищенное свойство

protected $callCount

$callVerifierFactory защищенное свойство

protected $callVerifierFactory

$calls защищенное свойство

protected $calls

$cardinality защищенное свойство

protected $cardinality

$eventCount защищенное свойство

protected $eventCount

$events защищенное свойство

protected $events