Skip to content

Commit

Permalink
cleaning up
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexzPurewoko committed Jul 17, 2024
1 parent 87cfa1e commit 6e8af0f
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions tests/Mail/MailMailerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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) {
Expand All @@ -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]';
}
}

0 comments on commit 6e8af0f

Please sign in to comment.