public function checkGenerated()
{
$cardinality = $this->resetCardinality();
$calls = $this->spy->allCalls();
$matchingEvents = array();
$totalCount = count($calls);
$matchCount = 0;
foreach ($calls as $call) {
if (!$call->responseEvent()) {
continue;
}
list(, $returnValue) = $call->response();
if ($returnValue instanceof Generator) {
$matchingEvents[] = $call;
++$matchCount;
}
}
if ($cardinality->matches($matchCount, $totalCount)) {
return $this->assertionRecorder->createSuccessFromEventCollection($this->generatorVerifierFactory->create($this->spy, $matchingEvents));
}
}