diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-03-27 23:32:55 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-03-27 23:58:37 +0200 |
commit | 8f336fda649c064cabfa692793334067ece780f9 (patch) | |
tree | 62702d9c78391031f810bdc78475d04c5f6807c0 /src/Wallabag/ImportBundle/Tests/Import | |
parent | 4d0ec0e72108ff47952906e5d968a7c3eb0a76f9 (diff) | |
download | wallabag-8f336fda649c064cabfa692793334067ece780f9.tar.gz wallabag-8f336fda649c064cabfa692793334067ece780f9.tar.zst wallabag-8f336fda649c064cabfa692793334067ece780f9.zip |
Tags were not imported in wallabag v2 import
Also, simplify exportAs matching format
Diffstat (limited to 'src/Wallabag/ImportBundle/Tests/Import')
-rw-r--r-- | src/Wallabag/ImportBundle/Tests/Import/WallabagV1ImportTest.php | 2 | ||||
-rw-r--r-- | src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/Wallabag/ImportBundle/Tests/Import/WallabagV1ImportTest.php b/src/Wallabag/ImportBundle/Tests/Import/WallabagV1ImportTest.php index 540eb7da..3ef852e5 100644 --- a/src/Wallabag/ImportBundle/Tests/Import/WallabagV1ImportTest.php +++ b/src/Wallabag/ImportBundle/Tests/Import/WallabagV1ImportTest.php | |||
@@ -2,9 +2,9 @@ | |||
2 | 2 | ||
3 | namespace Wallabag\ImportBundle\Tests\Import; | 3 | namespace Wallabag\ImportBundle\Tests\Import; |
4 | 4 | ||
5 | use Wallabag\ImportBundle\Import\WallabagV1Import; | ||
5 | use Wallabag\UserBundle\Entity\User; | 6 | use Wallabag\UserBundle\Entity\User; |
6 | use Wallabag\CoreBundle\Entity\Entry; | 7 | use Wallabag\CoreBundle\Entity\Entry; |
7 | use Wallabag\ImportBundle\Import\WallabagV1Import; | ||
8 | use Monolog\Logger; | 8 | use Monolog\Logger; |
9 | use Monolog\Handler\TestHandler; | 9 | use Monolog\Handler\TestHandler; |
10 | 10 | ||
diff --git a/src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php b/src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php index 341b1076..dbefdee3 100644 --- a/src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php +++ b/src/Wallabag/ImportBundle/Tests/Import/WallabagV2ImportTest.php | |||
@@ -4,6 +4,7 @@ namespace Wallabag\ImportBundle\Tests\Import; | |||
4 | 4 | ||
5 | use Wallabag\ImportBundle\Import\WallabagV2Import; | 5 | use Wallabag\ImportBundle\Import\WallabagV2Import; |
6 | use Wallabag\UserBundle\Entity\User; | 6 | use Wallabag\UserBundle\Entity\User; |
7 | use Wallabag\CoreBundle\Entity\Entry; | ||
7 | use Monolog\Logger; | 8 | use Monolog\Logger; |
8 | use Monolog\Handler\TestHandler; | 9 | use Monolog\Handler\TestHandler; |
9 | 10 | ||
@@ -66,6 +67,11 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase | |||
66 | ->method('getRepository') | 67 | ->method('getRepository') |
67 | ->willReturn($entryRepo); | 68 | ->willReturn($entryRepo); |
68 | 69 | ||
70 | $this->contentProxy | ||
71 | ->expects($this->exactly(2)) | ||
72 | ->method('updateEntry') | ||
73 | ->willReturn(new Entry($this->user)); | ||
74 | |||
69 | $res = $wallabagV2Import->import(); | 75 | $res = $wallabagV2Import->import(); |
70 | 76 | ||
71 | $this->assertTrue($res); | 77 | $this->assertTrue($res); |
@@ -90,6 +96,11 @@ class WallabagV2ImportTest extends \PHPUnit_Framework_TestCase | |||
90 | ->method('getRepository') | 96 | ->method('getRepository') |
91 | ->willReturn($entryRepo); | 97 | ->willReturn($entryRepo); |
92 | 98 | ||
99 | $this->contentProxy | ||
100 | ->expects($this->exactly(2)) | ||
101 | ->method('updateEntry') | ||
102 | ->willReturn(new Entry($this->user)); | ||
103 | |||
93 | // check that every entry persisted are archived | 104 | // check that every entry persisted are archived |
94 | $this->em | 105 | $this->em |
95 | ->expects($this->any()) | 106 | ->expects($this->any()) |