]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/Command/ExportCommandTest.php
Added test for deduplication
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / Command / ExportCommandTest.php
index 41491838b330f79c4be1a3dfe6f2e59616a43076..b21f3318554dc7210892185d6fb35cea611c4baf 100644 (file)
@@ -56,5 +56,23 @@ class ExportCommandTest extends WallabagCoreTestCase
         ]);
 
         $this->assertContains('Exporting 6 entrie(s) for user « admin »... Done', $tester->getDisplay());
+        $this->assertFileExists('admin-export.json');
+    }
+
+    public function testExportCommandWithSpecialPath()
+    {
+        $application = new Application($this->getClient()->getKernel());
+        $application->add(new ExportCommand());
+
+        $command = $application->find('wallabag:export');
+
+        $tester = new CommandTester($command);
+        $tester->execute([
+            'command' => $command->getName(),
+            'username' => 'admin',
+            'filepath' => 'specialexport.json',
+        ]);
+
+        $this->assertFileExists('specialexport.json');
     }
 }