PHP Class Eloquent\Phony\Verification\GeneratorVerifier

Inheritance: extends IterableVerifier
Afficher le fichier Open project: eloquent/phony

Méthodes publiques

Méthode Description
__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.

Method Details

__construct() public méthode

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() public méthode

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.
Résultat Eloquent\Phony\Event\EventCollection | null The result.

checkReceivedException() public méthode

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.
Résultat Eloquent\Phony\Event\EventCollection | null The result.

checkReturned() public méthode

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.
Résultat Eloquent\Phony\Event\EventCollection | null The result.

checkThrew() public méthode

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.
Résultat Eloquent\Phony\Event\EventCollection | null The result.

received() public méthode

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.
Résultat Eloquent\Phony\Event\EventCollection The result.

receivedException() public méthode

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.
Résultat Eloquent\Phony\Event\EventCollection The result.

returned() public méthode

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.
Résultat Eloquent\Phony\Event\EventCollection The result.

threw() public méthode

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.
Résultat Eloquent\Phony\Event\EventCollection The result.