]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/Mock/InstallCommandMock.php
Jump to Symfony 3.1
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / Mock / InstallCommandMock.php
diff --git a/tests/Wallabag/CoreBundle/Mock/InstallCommandMock.php b/tests/Wallabag/CoreBundle/Mock/InstallCommandMock.php
new file mode 100644 (file)
index 0000000..5806bd4
--- /dev/null
@@ -0,0 +1,22 @@
+<?php
+
+namespace Tests\Wallabag\CoreBundle\Mock;
+
+use Wallabag\CoreBundle\Command\InstallCommand;
+
+/**
+ * This mock aims to speed the test of InstallCommand by avoid calling external command
+ * like all doctrine commands.
+ *
+ * This speed the test but as a downside, it doesn't allow to fully test the InstallCommand
+ *
+ * Launching tests to avoid doctrine command:
+ *     phpunit --exclude-group command-doctrine
+ */
+class InstallCommandMock extends InstallCommand
+{
+    protected function runCommand($command, $parameters = [])
+    {
+        return $this;
+    }
+}