]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/ImportBundle/Import/ImportChainTest.php
Jump to Symfony 3.1
[github/wallabag/wallabag.git] / tests / Wallabag / ImportBundle / Import / ImportChainTest.php
diff --git a/tests/Wallabag/ImportBundle/Import/ImportChainTest.php b/tests/Wallabag/ImportBundle/Import/ImportChainTest.php
new file mode 100644 (file)
index 0000000..32568ce
--- /dev/null
@@ -0,0 +1,21 @@
+<?php
+
+namespace Tests\Wallabag\ImportBundle\Import;
+
+use Wallabag\ImportBundle\Import\ImportChain;
+
+class ImportChainTest extends \PHPUnit_Framework_TestCase
+{
+    public function testGetAll()
+    {
+        $import = $this->getMockBuilder('Wallabag\ImportBundle\Import\ImportInterface')
+            ->disableOriginalConstructor()
+            ->getMock();
+
+        $importChain = new ImportChain();
+        $importChain->addImport($import, 'alias');
+
+        $this->assertCount(1, $importChain->getAll());
+        $this->assertEquals($import, $importChain->getAll()['alias']);
+    }
+}