diff options
author | Jerome Charaoui <jerome@riseup.net> | 2016-12-03 09:44:34 -0500 |
---|---|---|
committer | Jerome Charaoui <jerome@riseup.net> | 2016-12-03 09:50:36 -0500 |
commit | a2c1b94e8200260c1d6172ec2c36ef9a0e956d02 (patch) | |
tree | e7b8c652958f21a5f70e020b564d4a976b2e66b9 | |
parent | cd82ace70a9fede70f44f7f11c05456118b36b04 (diff) | |
download | wallabag-a2c1b94e8200260c1d6172ec2c36ef9a0e956d02.tar.gz wallabag-a2c1b94e8200260c1d6172ec2c36ef9a0e956d02.tar.zst wallabag-a2c1b94e8200260c1d6172ec2c36ef9a0e956d02.zip |
Revert switch to KernelTestCase for ContentProxyTest
Define the error string manually inside the test class instead of
fetching it from app config.
-rw-r--r-- | tests/Wallabag/CoreBundle/CoreKernelTestCase.php | 17 | ||||
-rw-r--r-- | tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php | 7 |
2 files changed, 4 insertions, 20 deletions
diff --git a/tests/Wallabag/CoreBundle/CoreKernelTestCase.php b/tests/Wallabag/CoreBundle/CoreKernelTestCase.php deleted file mode 100644 index d14421f1..00000000 --- a/tests/Wallabag/CoreBundle/CoreKernelTestCase.php +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace tests\Wallabag\CoreBundle; | ||
4 | |||
5 | use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase; | ||
6 | |||
7 | abstract class CoreKernelTestCase extends KernelTestCase | ||
8 | { | ||
9 | protected $fetchingErrorMessage; | ||
10 | |||
11 | public function setUp() | ||
12 | { | ||
13 | self::bootKernel(); | ||
14 | $container = self::$kernel->getContainer(); | ||
15 | $this->fetchingErrorMessage = $container->getParameter('wallabag_core.fetching_error_message'); | ||
16 | } | ||
17 | } | ||
diff --git a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php index 55e4d506..2ca13b91 100644 --- a/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php +++ b/tests/Wallabag/CoreBundle/Helper/ContentProxyTest.php | |||
@@ -1,16 +1,17 @@ | |||
1 | <?php | 1 | <?php |
2 | 2 | ||
3 | namespace tests\Wallabag\CoreBundle\Helper; | 3 | namespace Tests\Wallabag\CoreBundle\Helper; |
4 | 4 | ||
5 | use Psr\Log\NullLogger; | 5 | use Psr\Log\NullLogger; |
6 | use Wallabag\CoreBundle\Helper\ContentProxy; | 6 | use Wallabag\CoreBundle\Helper\ContentProxy; |
7 | use Wallabag\CoreBundle\Entity\Entry; | 7 | use Wallabag\CoreBundle\Entity\Entry; |
8 | use Wallabag\CoreBundle\Entity\Tag; | 8 | use Wallabag\CoreBundle\Entity\Tag; |
9 | use Wallabag\UserBundle\Entity\User; | 9 | use Wallabag\UserBundle\Entity\User; |
10 | use Tests\Wallabag\CoreBundle\CoreKernelTestCase; | ||
11 | 10 | ||
12 | class ContentProxyTest extends CoreKernelTestCase | 11 | class ContentProxyTest extends \PHPUnit_Framework_TestCase |
13 | { | 12 | { |
13 | private $fetchingErrorMessage = 'wallabag can\'t retrieve contents for this article. Please <a href="http://doc.wallabag.org/en/master/user/errors_during_fetching.html#how-can-i-help-to-fix-that">troubleshoot this issue</a>.'; | ||
14 | |||
14 | public function testWithBadUrl() | 15 | public function testWithBadUrl() |
15 | { | 16 | { |
16 | $tagger = $this->getTaggerMock(); | 17 | $tagger = $this->getTaggerMock(); |