-
Notifications
You must be signed in to change notification settings - Fork 11.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show the names of any Mailables which were queued unexpectedly in tests
- Loading branch information
Showing
2 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,6 +140,20 @@ public function testAssertNothingSent() | |
$this->assertThat($e, new ExceptionMessage('The following Mailables were sent unexpectedly: Illuminate\Tests\Support\MailableStub')); | ||
} | ||
} | ||
|
||
public function testAssertNothingQueued() | ||
{ | ||
$this->fake->assertNothingQueued(); | ||
|
||
$this->fake->to('[email protected]')->queue($this->mailable); | ||
|
||
try { | ||
$this->fake->assertNothingQueued(); | ||
$this->fail(); | ||
} catch (ExpectationFailedException $e) { | ||
$this->assertThat($e, new ExceptionMessage('The following Mailables were queued unexpectedly: Illuminate\Tests\Support\MailableStub')); | ||
} | ||
} | ||
} | ||
|
||
class MailableStub extends Mailable implements MailableContract | ||
|