Fixed @j0k3r review

This commit is contained in:
Nicolas Lœuillet 2017-05-05 14:54:03 +02:00
parent d09fe4d233
commit 89f108b45a
No known key found for this signature in database
GPG key ID: BDC1EFB5CA0145F2
2 changed files with 4 additions and 6 deletions

View 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;
}
}

View 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());