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

Наследование: extends IterableVerifier
Показать файл Открыть проект

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

Метод Описание
__construct ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, array $calls, MatcherFactory $matcherFactory, CallVerifierFactory $callVerifierFactory, Eloquent\Phony\Assertion\AssertionRecorder $assertionRecorder, AssertionRenderer $assertionRenderer ) Construct a new generator verifier.
checkReceived ( mixed $value = null ) : Eloquent\Phony\Event\EventCollection | null Checks if the subject received the supplied value.
checkReceivedException ( Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type = null ) : Eloquent\Phony\Event\EventCollection | null Checks if the subject received an exception of the supplied type.
checkReturned ( mixed $value = null ) : Eloquent\Phony\Event\EventCollection | null Checks if the subject returned the supplied value from a generator.
checkThrew ( Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type = null ) : Eloquent\Phony\Event\EventCollection | null Checks if an exception of the supplied type was thrown from a generator.
received ( mixed $value = null ) : Eloquent\Phony\Event\EventCollection Throws an exception unless the subject received the supplied value.
receivedException ( Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type = null ) : Eloquent\Phony\Event\EventCollection Throws an exception unless the subject received an exception of the supplied type.
returned ( mixed $value = null ) : Eloquent\Phony\Event\EventCollection Throws an exception unless the subject returned the supplied value from a generator.
threw ( Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type = null ) : Eloquent\Phony\Event\EventCollection Throws an exception unless an exception of the supplied type was thrown from a generator.

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

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

Construct a new generator verifier.
public __construct ( Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call $subject, array $calls, MatcherFactory $matcherFactory, CallVerifierFactory $callVerifierFactory, Eloquent\Phony\Assertion\AssertionRecorder $assertionRecorder, AssertionRenderer $assertionRenderer )
$subject Eloquent\Phony\Spy\Spy | Eloquent\Phony\Call\Call The subject.
$calls array
$matcherFactory Eloquent\Phony\Matcher\MatcherFactory The matcher factory to use.
$callVerifierFactory Eloquent\Phony\Call\CallVerifierFactory The call verifier factory to use.
$assertionRecorder Eloquent\Phony\Assertion\AssertionRecorder The assertion recorder to use.
$assertionRenderer Eloquent\Phony\Assertion\AssertionRenderer The assertion renderer to use.

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

When called with no arguments, this method simply checks that the subject received any value.
public checkReceived ( mixed $value = null ) : Eloquent\Phony\Event\EventCollection | null
$value mixed The value.
Результат Eloquent\Phony\Event\EventCollection | null The result.

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

Checks if the subject received an exception of the supplied type.
public checkReceivedException ( Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type = null ) : Eloquent\Phony\Event\EventCollection | null
$type Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null An exception to match, the type of exception, or null for any exception.
Результат Eloquent\Phony\Event\EventCollection | null The result.

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

Checks if the subject returned the supplied value from a generator.
public checkReturned ( mixed $value = null ) : Eloquent\Phony\Event\EventCollection | null
$value mixed The value.
Результат Eloquent\Phony\Event\EventCollection | null The result.

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

Checks if an exception of the supplied type was thrown from a generator.
public checkThrew ( Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type = null ) : Eloquent\Phony\Event\EventCollection | null
$type Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null An exception to match, the type of exception, or null for any exception.
Результат Eloquent\Phony\Event\EventCollection | null The result.

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

When called with no arguments, this method simply checks that the subject received any value.
public received ( mixed $value = null ) : Eloquent\Phony\Event\EventCollection
$value mixed The value.
Результат Eloquent\Phony\Event\EventCollection The result.

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

Throws an exception unless the subject received an exception of the supplied type.
public receivedException ( Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type = null ) : Eloquent\Phony\Event\EventCollection
$type Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null An exception to match, the type of exception, or null for any exception.
Результат Eloquent\Phony\Event\EventCollection The result.

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

Throws an exception unless the subject returned the supplied value from a generator.
public returned ( mixed $value = null ) : Eloquent\Phony\Event\EventCollection
$value mixed The value.
Результат Eloquent\Phony\Event\EventCollection The result.

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

Throws an exception unless an exception of the supplied type was thrown from a generator.
public threw ( Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null $type = null ) : Eloquent\Phony\Event\EventCollection
$type Eloquent\Phony\Matcher\Matcher | Exceptio\Exception | Erro\Error | string | null An exception to match, the type of exception, or null for any exception.
Результат Eloquent\Phony\Event\EventCollection The result.