diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-01-15 15:28:22 +0100 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-01-15 15:28:32 +0100 |
commit | 78833672469f7beb0c4a195aa0a76f7ca4133057 (patch) | |
tree | 87e295afbfc22e94262f3c498ce758a1101c939e /src/Wallabag/ImportBundle/Import | |
parent | 790573d45899504bdecd2573c8f64018e23b139e (diff) | |
download | wallabag-78833672469f7beb0c4a195aa0a76f7ca4133057.tar.gz wallabag-78833672469f7beb0c4a195aa0a76f7ca4133057.tar.zst wallabag-78833672469f7beb0c4a195aa0a76f7ca4133057.zip |
Fix `findOneByUrl` side effect in tests
Fix #1566
Diffstat (limited to 'src/Wallabag/ImportBundle/Import')
-rw-r--r-- | src/Wallabag/ImportBundle/Import/PocketImport.php | 2 | ||||
-rw-r--r-- | src/Wallabag/ImportBundle/Import/WallabagV1Import.php | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Wallabag/ImportBundle/Import/PocketImport.php b/src/Wallabag/ImportBundle/Import/PocketImport.php index cdcec1e2..72b9047c 100644 --- a/src/Wallabag/ImportBundle/Import/PocketImport.php +++ b/src/Wallabag/ImportBundle/Import/PocketImport.php | |||
@@ -214,7 +214,7 @@ class PocketImport implements ImportInterface | |||
214 | 214 | ||
215 | $existingEntry = $this->em | 215 | $existingEntry = $this->em |
216 | ->getRepository('WallabagCoreBundle:Entry') | 216 | ->getRepository('WallabagCoreBundle:Entry') |
217 | ->existByUrlAndUserId($url, $this->user->getId()); | 217 | ->findByUrlAndUserId($url, $this->user->getId()); |
218 | 218 | ||
219 | if (false !== $existingEntry) { | 219 | if (false !== $existingEntry) { |
220 | ++$this->skippedEntries; | 220 | ++$this->skippedEntries; |
diff --git a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php index 393089d6..6f8feaf3 100644 --- a/src/Wallabag/ImportBundle/Import/WallabagV1Import.php +++ b/src/Wallabag/ImportBundle/Import/WallabagV1Import.php | |||
@@ -127,7 +127,7 @@ class WallabagV1Import implements ImportInterface | |||
127 | foreach ($entries as $importedEntry) { | 127 | foreach ($entries as $importedEntry) { |
128 | $existingEntry = $this->em | 128 | $existingEntry = $this->em |
129 | ->getRepository('WallabagCoreBundle:Entry') | 129 | ->getRepository('WallabagCoreBundle:Entry') |
130 | ->existByUrlAndUserId($importedEntry['url'], $this->user->getId()); | 130 | ->findByUrlAndUserId($importedEntry['url'], $this->user->getId()); |
131 | 131 | ||
132 | if (false !== $existingEntry) { | 132 | if (false !== $existingEntry) { |
133 | ++$this->skippedEntries; | 133 | ++$this->skippedEntries; |