Fix some Scrutinizer issues

This commit is contained in:
Jeremy Benoist
2016-03-27 20:35:56 +02:00
parent 5d6f6f56a2
commit 4d0ec0e721
9 changed files with 183 additions and 32 deletions

View File

@ -3,6 +3,7 @@
namespace Wallabag\ImportBundle\Tests\Import;
use Wallabag\UserBundle\Entity\User;
use Wallabag\CoreBundle\Entity\Entry;
use Wallabag\ImportBundle\Import\WallabagV1Import;
use Monolog\Logger;
use Monolog\Handler\TestHandler;
@ -71,7 +72,7 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
->getMock();
$this->contentProxy
->expects($this->once())
->expects($this->exactly(3))
->method('updateEntry')
->willReturn($entry);
@ -99,6 +100,11 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
->method('getRepository')
->willReturn($entryRepo);
$this->contentProxy
->expects($this->exactly(3))
->method('updateEntry')
->willReturn(new Entry($this->user));
// check that every entry persisted are archived
$this->em
->expects($this->any())