Eloquent\Phony\Verification\IterableVerifier::__construct PHP Method

__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.
    public function __construct($subject, array $calls, MatcherFactory $matcherFactory, CallVerifierFactory $callVerifierFactory, AssertionRecorder $assertionRecorder, AssertionRenderer $assertionRenderer)
    {
        $this->subject = $subject;
        $this->matcherFactory = $matcherFactory;
        $this->assertionRecorder = $assertionRecorder;
        $this->assertionRenderer = $assertionRenderer;
        $this->isGenerator = false;
        parent::__construct($calls, $callVerifierFactory);
    }

Usage Example

Example #1
0
 /**
  * Construct a new generator verifier.
  *
  * @param Spy|Call            $subject             The subject.
  * @param array<Call>         $calls               The generator calls.
  * @param MatcherFactory      $matcherFactory      The matcher factory to use.
  * @param CallVerifierFactory $callVerifierFactory The call verifier factory to use.
  * @param AssertionRecorder   $assertionRecorder   The assertion recorder to use.
  * @param AssertionRenderer   $assertionRenderer   The assertion renderer to use.
  */
 public function __construct($subject, array $calls, MatcherFactory $matcherFactory, CallVerifierFactory $callVerifierFactory, AssertionRecorder $assertionRecorder, AssertionRenderer $assertionRenderer)
 {
     parent::__construct($subject, $calls, $matcherFactory, $callVerifierFactory, $assertionRecorder, $assertionRenderer);
     $this->isGenerator = true;
 }