Skip to content

Commit 939577d

Browse files
Replace TestCase::assertTrue(true) with TestCase::expectNotToPerformAssertions()
1 parent 9e2ccc9 commit 939577d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Tests/MailerTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ public function dispatch($message, array $stamps = []): Envelope
8686

8787
public function testRejectMessage()
8888
{
89+
$this->expectNotToPerformAssertions();
90+
8991
$dispatcher = new EventDispatcher();
9092
$dispatcher->addListener(MessageEvent::class, fn (MessageEvent $event) => $event->reject(), 255);
9193
$dispatcher->addListener(MessageEvent::class, fn () => throw new \RuntimeException('Should never be called.'));
@@ -111,6 +113,5 @@ public function __toString(): string
111113
$message = new RawMessage('');
112114
$envelope = new MailerEnvelope(new Address('fabien@example.com'), [new Address('helene@example.com')]);
113115
$mailer->send($message, $envelope);
114-
$this->assertTrue(true);
115116
}
116117
}

0 commit comments

Comments
 (0)