diff options
Diffstat (limited to 'tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php')
-rw-r--r-- | tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php b/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php index aa176068..1713c10c 100644 --- a/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php +++ b/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php | |||
@@ -6,22 +6,6 @@ use PHPUnit\Framework\TestCase; | |||
6 | use Wallabag\UserBundle\Entity\User; | 6 | use Wallabag\UserBundle\Entity\User; |
7 | use Wallabag\UserBundle\Mailer\AuthCodeMailer; | 7 | use Wallabag\UserBundle\Mailer\AuthCodeMailer; |
8 | 8 | ||
9 | /** | ||
10 | * @see https://www.pmg.com/blog/integration-testing-swift-mailer/ | ||
11 | */ | ||
12 | final class CountableMemorySpool extends \Swift_MemorySpool implements \Countable | ||
13 | { | ||
14 | public function count() | ||
15 | { | ||
16 | return \count($this->messages); | ||
17 | } | ||
18 | |||
19 | public function getMessages() | ||
20 | { | ||
21 | return $this->messages; | ||
22 | } | ||
23 | } | ||
24 | |||
25 | class AuthCodeMailerTest extends TestCase | 9 | class AuthCodeMailerTest extends TestCase |
26 | { | 10 | { |
27 | protected $mailer; | 11 | protected $mailer; |
@@ -49,7 +33,7 @@ TWIG; | |||
49 | public function testSendEmail() | 33 | public function testSendEmail() |
50 | { | 34 | { |
51 | $user = new User(); | 35 | $user = new User(); |
52 | $user->setTwoFactorAuthentication(true); | 36 | $user->setEmailTwoFactor(true); |
53 | $user->setEmailAuthCode(666666); | 37 | $user->setEmailAuthCode(666666); |
54 | $user->setEmail('test@wallabag.io'); | 38 | $user->setEmail('test@wallabag.io'); |
55 | $user->setName('Bob'); | 39 | $user->setName('Bob'); |