Revert switch to KernelTestCase for ContentProxyTest

Define the error string manually inside the test class instead of
fetching it from app config.
This commit is contained in:
Jerome Charaoui 2016-12-03 09:44:34 -05:00
parent cd82ace70a
commit a2c1b94e82
2 changed files with 4 additions and 20 deletions

View File

@ -1,17 +0,0 @@
<?php
namespace tests\Wallabag\CoreBundle;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
abstract class CoreKernelTestCase extends KernelTestCase
{
protected $fetchingErrorMessage;
public function setUp()
{
self::bootKernel();
$container = self::$kernel->getContainer();
$this->fetchingErrorMessage = $container->getParameter('wallabag_core.fetching_error_message');
}
}

View File

@ -1,16 +1,17 @@
<?php <?php
namespace tests\Wallabag\CoreBundle\Helper; namespace Tests\Wallabag\CoreBundle\Helper;
use Psr\Log\NullLogger; use Psr\Log\NullLogger;
use Wallabag\CoreBundle\Helper\ContentProxy; use Wallabag\CoreBundle\Helper\ContentProxy;
use Wallabag\CoreBundle\Entity\Entry; use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\CoreBundle\Entity\Tag; use Wallabag\CoreBundle\Entity\Tag;
use Wallabag\UserBundle\Entity\User; use Wallabag\UserBundle\Entity\User;
use Tests\Wallabag\CoreBundle\CoreKernelTestCase;
class ContentProxyTest extends CoreKernelTestCase class ContentProxyTest extends \PHPUnit_Framework_TestCase
{ {
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>.';
public function testWithBadUrl() public function testWithBadUrl()
{ {
$tagger = $this->getTaggerMock(); $tagger = $this->getTaggerMock();