]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fixed @j0k3r review
authorNicolas Lœuillet <nicolas@loeuillet.org>
Fri, 5 May 2017 12:54:03 +0000 (14:54 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Fri, 5 May 2017 12:54:03 +0000 (14:54 +0200)
src/Wallabag/CoreBundle/Repository/EntryRepository.php
tests/Wallabag/CoreBundle/Command/CleanDuplicatesCommandTest.php

index 2e03fa194f72cee270c1ee4df0d267a9e4e6da36..6972e974eeeb1853d28472f5be3ebf1b881ea9fa 100644 (file)
@@ -403,12 +403,10 @@ class EntryRepository extends EntityRepository
      */
     public function findAllByUrlAndUserId($url, $userId)
     {
-        $res = $this->createQueryBuilder('e')
+        return $this->createQueryBuilder('e')
             ->where('e.url = :url')->setParameter('url', urldecode($url))
             ->andWhere('e.user = :user_id')->setParameter('user_id', $userId)
             ->getQuery()
             ->getResult();
-
-        return $res;
     }
 }
index 1f5921d2b3fe967930554b1c6601eeac99ef4283..688cc388ab6a839d0bac0ab31fb917738227ff6b 100644 (file)
@@ -10,7 +10,7 @@ use Wallabag\CoreBundle\Entity\Entry;
 
 class CleanDuplicatesCommandTest extends WallabagCoreTestCase
 {
-    public function testTagAll()
+    public function testRunCleanDuplicates()
     {
         $application = new Application($this->getClient()->getKernel());
         $application->add(new CleanDuplicatesCommand());
@@ -26,7 +26,7 @@ class CleanDuplicatesCommandTest extends WallabagCoreTestCase
         $this->assertContains('Finished cleaning. 0 duplicates found in total', $tester->getDisplay());
     }
 
-    public function testRunTagAllCommandWithBadUsername()
+    public function testRunCleanDuplicatesCommandWithBadUsername()
     {
         $application = new Application($this->getClient()->getKernel());
         $application->add(new CleanDuplicatesCommand());
@@ -42,7 +42,7 @@ class CleanDuplicatesCommandTest extends WallabagCoreTestCase
         $this->assertContains('User "unknown" not found', $tester->getDisplay());
     }
 
-    public function testRunTagAllCommandForUser()
+    public function testRunCleanDuplicatesCommandForUser()
     {
         $application = new Application($this->getClient()->getKernel());
         $application->add(new CleanDuplicatesCommand());