From c5c7f90a81d7a2082c7b6dad38c2a6dfdba8d016 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 3 Jan 2016 10:32:56 +0100 Subject: Fix tag related test for Pocket --- src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php') diff --git a/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php b/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php index 6ee70db0..1fc2dfa6 100644 --- a/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php +++ b/src/Wallabag/ImportBundle/Tests/Import/PocketImportTest.php @@ -260,7 +260,9 @@ class PocketImportTest extends \PHPUnit_Framework_TestCase ->getMock(); $tagRepo->expects($this->exactly(2)) - ->method('findOneByLabelAndUserId') + // the method `findOneByLabel` doesn't exist, EntityRepository will then call `_call` method + // to magically call the `findOneBy` with ['label' => 'foo'] + ->method('__call') ->will($this->onConsecutiveCalls(false, $tag)); $this->em -- cgit v1.2.3