X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=tests%2FWallabag%2FUserBundle%2FMailer%2FAuthCodeMailerTest.php;h=1713c10c81329108534063ab2db39dad6bf3672e;hb=92a66835624acf6fd14f5adc5f8aab399658592e;hp=7381ccf12a2fe429530d038404ea0fe2d74ff31d;hpb=1953a872932a63792293b4aec087880265ba89f7;p=github%2Fwallabag%2Fwallabag.git diff --git a/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php b/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php index 7381ccf1..1713c10c 100644 --- a/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php +++ b/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php @@ -2,26 +2,11 @@ namespace Tests\Wallabag\UserBundle\Mailer; +use PHPUnit\Framework\TestCase; use Wallabag\UserBundle\Entity\User; use Wallabag\UserBundle\Mailer\AuthCodeMailer; -/** - * @see https://www.pmg.com/blog/integration-testing-swift-mailer/ - */ -final class CountableMemorySpool extends \Swift_MemorySpool implements \Countable -{ - public function count() - { - return count($this->messages); - } - - public function getMessages() - { - return $this->messages; - } -} - -class AuthCodeMailerTest extends \PHPUnit_Framework_TestCase +class AuthCodeMailerTest extends TestCase { protected $mailer; protected $spool; @@ -48,7 +33,7 @@ TWIG; public function testSendEmail() { $user = new User(); - $user->setTwoFactorAuthentication(true); + $user->setEmailTwoFactor(true); $user->setEmailAuthCode(666666); $user->setEmail('test@wallabag.io'); $user->setName('Bob');