diff options
Diffstat (limited to 'tests/Wallabag/UserBundle')
3 files changed, 20 insertions, 17 deletions
diff --git a/tests/Wallabag/UserBundle/Controller/ManageControllerTest.php b/tests/Wallabag/UserBundle/Controller/ManageControllerTest.php index adc2cf09..f44e6fbf 100644 --- a/tests/Wallabag/UserBundle/Controller/ManageControllerTest.php +++ b/tests/Wallabag/UserBundle/Controller/ManageControllerTest.php | |||
@@ -1,6 +1,6 @@ | |||
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace Wallabag\UserBundle\Tests\Controller; | 3 | namespace Tests\Wallabag\UserBundle\Controller; |
4 | 4 | ||
5 | use Tests\Wallabag\CoreBundle\WallabagCoreTestCase; | 5 | use Tests\Wallabag\CoreBundle\WallabagCoreTestCase; |
6 | 6 | ||
diff --git a/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php b/tests/Wallabag/UserBundle/Mailer/AuthCodeMailerTest.php index aa176068..e34e13a8 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; |
diff --git a/tests/Wallabag/UserBundle/Mailer/CountableMemorySpool.php b/tests/Wallabag/UserBundle/Mailer/CountableMemorySpool.php new file mode 100644 index 00000000..53f240a1 --- /dev/null +++ b/tests/Wallabag/UserBundle/Mailer/CountableMemorySpool.php | |||
@@ -0,0 +1,19 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Tests\Wallabag\UserBundle\Mailer; | ||
4 | |||
5 | /** | ||
6 | * @see https://www.pmg.com/blog/integration-testing-swift-mailer/ | ||
7 | */ | ||
8 | final class CountableMemorySpool extends \Swift_MemorySpool implements \Countable | ||
9 | { | ||
10 | public function count() | ||
11 | { | ||
12 | return \count($this->messages); | ||
13 | } | ||
14 | |||
15 | public function getMessages() | ||
16 | { | ||
17 | return $this->messages; | ||
18 | } | ||
19 | } | ||