public function toString(): string
{ return sprintf('%shas %s "%d" emails',
$this->transport ?
$this->transport.' ' : '',
$this->queued ? 'queued' : 'sent',
$this->expectedValue
);
} /**
* @param MessageEvents $events
*/
protected function matches($events): bool
{ return $this->expectedValue ===
$this->
countEmails($events);
} /**
* @param MessageEvents $events
*/
protected function failureDescription($events): string
{ return sprintf('the Transport %s (%d %s)',
$this->
toString(),
$this->
countEmails($events),
$this->queued ? 'queued' : 'sent'
);
} private function countEmails(MessageEvents
$events): int
{