]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/ImportBundle/Tests/Import/WallabagV1ImportTest.php
Fix `findOneByUrl` side effect in tests
[github/wallabag/wallabag.git] / src / Wallabag / ImportBundle / Tests / Import / WallabagV1ImportTest.php
index fc66d402098c295a8dac3fa96a82344e79782700..90483480816d5c212d52f100dd4a75a69b4687c1 100644 (file)
@@ -38,8 +38,9 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
     {
         $wallabagV1Import = $this->getWallabagV1Import();
 
-        $this->assertEquals('Wallabag v1', $wallabagV1Import->getName());
-        $this->assertEquals('This importer will import all your wallabag v1 articles.', $wallabagV1Import->getDescription());
+        $this->assertEquals('wallabag v1', $wallabagV1Import->getName());
+        $this->assertNotEmpty($wallabagV1Import->getUrl());
+        $this->assertContains('This importer will import all your wallabag v1 articles.', $wallabagV1Import->getDescription());
     }
 
     public function testImport()
@@ -52,7 +53,7 @@ class WallabagV1ImportTest extends \PHPUnit_Framework_TestCase
             ->getMock();
 
         $entryRepo->expects($this->exactly(3))
-            ->method('existByUrlAndUserId')
+            ->method('findByUrlAndUserId')
             ->will($this->onConsecutiveCalls(false, true, false));
 
         $this->em