-
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.
- Loading branch information
1 parent
87cfa1e
commit 6e8af0f
Showing
1 changed file
with
1 addition
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,8 +20,6 @@ protected function tearDown(): void | |
|
||
public function testMailerSendSendsMessageWithProperViewContent() | ||
{ | ||
unset($_SERVER['__mailer.test']); | ||
|
||
$view = m::mock(Factory::class); | ||
$view->shouldReceive('make')->once()->andReturn($view); | ||
$view->shouldReceive('render')->once()->andReturn('rendered.view'); | ||
|
@@ -251,7 +249,7 @@ public function testGlobalFromIsRespectedOnAllMessages() | |
$view = m::mock(Factory::class); | ||
$view->shouldReceive('make')->once()->andReturn($view); | ||
$view->shouldReceive('render')->once()->andReturn('rendered.view'); | ||
$mailer = new Mailer($view, $transport = new ArrayTransport); | ||
$mailer = new Mailer($view, $transport = new ArrayTransport()); | ||
$mailer->alwaysFrom('[email protected]'); | ||
|
||
$mailer->send('foo', ['data'], function (Message $message) { | ||
|
@@ -267,25 +265,4 @@ public function testGlobalFromIsRespectedOnAllMessages() | |
self::assertSame('[email protected]', $sentMessage->getEnvelope()->getRecipients()[0]->getAddress()); | ||
self::assertSame('[email protected]', $sentMessage->getEnvelope()->getSender()->getAddress()); | ||
} | ||
|
||
|
||
protected function getMailer() | ||
{ | ||
return new Illuminate\Mail\Mailer(m::mock(Factory::class), m::mock('Swift_Mailer')); | ||
} | ||
|
||
|
||
protected function getMocks() | ||
{ | ||
return [m::mock(Factory::class), m::mock('Swift_Mailer')]; | ||
} | ||
|
||
} | ||
|
||
class FailingSwiftMailerStub | ||
{ | ||
public function send($message, &$failed) | ||
{ | ||
$failed[] = '[email protected]'; | ||
} | ||
} |