PHP Class Eloquent\Phony\Verification\IterableVerifier

Inheritance: extends AbstractCardinalityVerifierEventCollection
显示文件 Open project: eloquent/phony Class Usage Examples

Protected Properties

Property Type Description
$assertionRecorder
$assertionRenderer
$isGenerator
$matcherFactory
$subject

Public Methods

Method 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 iterable verifier.
checkConsumed ( ) : Eloquent\Phony\Event\EventCollection | null Checks if the subject was completely consumed.
checkProduced ( mixed $keyOrValue = null, mixed $value = null ) : Eloquent\Phony\Event\EventCollection | null Checks if the subject produced the supplied values.
checkUsed ( ) : Eloquent\Phony\Event\EventCollection | null Checks if iteration of the subject commenced.
consumed ( ) : Eloquent\Phony\Event\EventCollection Throws an exception unless the subject was completely consumed.
produced ( mixed $keyOrValue = null, mixed $value = null ) : Eloquent\Phony\Event\EventCollection Throws an exception unless the subject produced the supplied values.
used ( ) : Eloquent\Phony\Event\EventCollection Throws an exception unless iteration of the subject commenced.

Method Details

__construct() public method

Construct a new iterable 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.

checkConsumed() public method

Checks if the subject was completely consumed.
public checkConsumed ( ) : Eloquent\Phony\Event\EventCollection | null
return Eloquent\Phony\Event\EventCollection | null The result.

checkProduced() public method

When called with no arguments, this method simply checks that the subject produced any value. With a single argument, it checks that a value matching the argument was produced. With two arguments, it checks that a key and value matching the respective arguments were produced together.
public checkProduced ( mixed $keyOrValue = null, mixed $value = null ) : Eloquent\Phony\Event\EventCollection | null
$keyOrValue mixed The key or value.
$value mixed The value.
return Eloquent\Phony\Event\EventCollection | null The result.

checkUsed() public method

Checks if iteration of the subject commenced.
public checkUsed ( ) : Eloquent\Phony\Event\EventCollection | null
return Eloquent\Phony\Event\EventCollection | null The result.

consumed() public method

Throws an exception unless the subject was completely consumed.
public consumed ( ) : Eloquent\Phony\Event\EventCollection
return Eloquent\Phony\Event\EventCollection The result.

produced() public method

When called with no arguments, this method simply checks that the subject produced any value. With a single argument, it checks that a value matching the argument was produced. With two arguments, it checks that a key and value matching the respective arguments were produced together.
public produced ( mixed $keyOrValue = null, mixed $value = null ) : Eloquent\Phony\Event\EventCollection
$keyOrValue mixed The key or value.
$value mixed The value.
return Eloquent\Phony\Event\EventCollection The result.

used() public method

Throws an exception unless iteration of the subject commenced.
public used ( ) : Eloquent\Phony\Event\EventCollection
return Eloquent\Phony\Event\EventCollection The result.

Property Details

$assertionRecorder protected_oe property

protected $assertionRecorder

$assertionRenderer protected_oe property

protected $assertionRenderer

$isGenerator protected_oe property

protected $isGenerator

$matcherFactory protected_oe property

protected $matcherFactory

$subject protected_oe property

protected $subject