Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

Commit c3bb253

Browse files
chamavssfinney
authored andcommitted
fixes #36
1 parent b0daac1 commit c3bb253

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/MailRecorder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ class MailRecorder implements Swift_Events_EventListener
2121
/**
2222
* MailRecorder constructor.
2323
*
24-
* @param PHPUnit_Framework_TestCase $test
24+
* @param $test
2525
*/
26-
public function __construct(PHPUnit_Framework_TestCase $test)
26+
public function __construct($test)
2727
{
2828
$this->test = $test;
2929
}

src/MailTracking.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,10 @@ trait MailTracking
4848
*/
4949
public function setUpMailTracking()
5050
{
51-
Mail::getSwiftMailer()
52-
->registerPlugin(new MailRecorder($this));
51+
$this->afterApplicationCreated(function() {
52+
Mail::getSwiftMailer()
53+
->registerPlugin(new MailRecorder($this));
54+
});
5355
}
5456

5557
/**

0 commit comments

Comments
 (0)