1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-10-15 19:42:08 +00:00

Fix findOneByUrl side effect in tests

Fix #1566
This commit is contained in:
Jeremy Benoist 2016-01-15 15:28:22 +01:00
parent 790573d458
commit 7883367246
8 changed files with 33 additions and 18 deletions

View file

@ -235,10 +235,9 @@ class EntryRepository extends EntityRepository
*
* @return array|bool
*/
public function existByUrlAndUserId($url, $userId)
public function findByUrlAndUserId($url, $userId)
{
$res = $this->createQueryBuilder('e')
->select('e.id, e.createdAt')
->where('e.url = :url')->setParameter('url', $url)
->andWhere('e.user = :user_id')->setParameter('user_id', $userId)
->getQuery()