forked from laravel/framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[11.x] Add additional context to Mailable assertion messages (laravel…
…#49631) * add recipient type to message * fix tests
- Loading branch information
1 parent
b100b8a
commit 6ca6b0c
Showing
2 changed files
with
9 additions
and
9 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 |
---|---|---|
|
@@ -61,7 +61,7 @@ public function render() | |
$mailable->assertHasTo('[email protected]', 'Taylor Otwell'); | ||
$this->fail(); | ||
} catch (AssertionFailedError $e) { | ||
$this->assertSame("Did not see expected recipient [[email protected] (Taylor Otwell)] in email recipients.\nFailed asserting that false is true.", $e->getMessage()); | ||
$this->assertSame("Did not see expected recipient [[email protected] (Taylor Otwell)] in email 'to' recipients.\nFailed asserting that false is true.", $e->getMessage()); | ||
} | ||
|
||
$mailable = new WelcomeMailableStub; | ||
|
@@ -107,7 +107,7 @@ public function render() | |
if (! is_string($address)) { | ||
$address = json_encode($address); | ||
} | ||
$this->assertSame("Did not see expected recipient [{$address}] in email recipients.\nFailed asserting that false is true.", $e->getMessage()); | ||
$this->assertSame("Did not see expected recipient [{$address}] in email 'to' recipients.\nFailed asserting that false is true.", $e->getMessage()); | ||
} | ||
} | ||
} | ||
|
@@ -146,7 +146,7 @@ public function render() | |
$mailable->assertHasCc('[email protected]', 'Taylor Otwell'); | ||
$this->fail(); | ||
} catch (AssertionFailedError $e) { | ||
$this->assertSame("Did not see expected recipient [[email protected] (Taylor Otwell)] in email recipients.\nFailed asserting that false is true.", $e->getMessage()); | ||
$this->assertSame("Did not see expected recipient [[email protected] (Taylor Otwell)] in email 'cc' recipients.\nFailed asserting that false is true.", $e->getMessage()); | ||
} | ||
|
||
$mailable = new WelcomeMailableStub; | ||
|
@@ -204,7 +204,7 @@ public function render() | |
if (! is_string($address)) { | ||
$address = json_encode($address); | ||
} | ||
$this->assertSame("Did not see expected recipient [{$address}] in email recipients.\nFailed asserting that false is true.", $e->getMessage()); | ||
$this->assertSame("Did not see expected recipient [{$address}] in email 'cc' recipients.\nFailed asserting that false is true.", $e->getMessage()); | ||
} | ||
} | ||
} | ||
|
@@ -243,7 +243,7 @@ public function render() | |
$mailable->assertHasBcc('[email protected]', 'Taylor Otwell'); | ||
$this->fail(); | ||
} catch (AssertionFailedError $e) { | ||
$this->assertSame("Did not see expected recipient [[email protected] (Taylor Otwell)] in email recipients.\nFailed asserting that false is true.", $e->getMessage()); | ||
$this->assertSame("Did not see expected recipient [[email protected] (Taylor Otwell)] in email 'bcc' recipients.\nFailed asserting that false is true.", $e->getMessage()); | ||
} | ||
|
||
$mailable = new WelcomeMailableStub; | ||
|
@@ -301,7 +301,7 @@ public function render() | |
if (! is_string($address)) { | ||
$address = json_encode($address); | ||
} | ||
$this->assertSame("Did not see expected recipient [{$address}] in email recipients.\nFailed asserting that false is true.", $e->getMessage()); | ||
$this->assertSame("Did not see expected recipient [{$address}] in email 'bcc' recipients.\nFailed asserting that false is true.", $e->getMessage()); | ||
} | ||
} | ||
} | ||
|