]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
Move API stuff in ApiBundle
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Tests / Command / InstallCommandTest.php
index 64f6c3290dbef63f1bbd0330e4bae943fbe7cb94..7a819953e07d08bc24caa3f2a39d3761100a2723 100644 (file)
@@ -2,8 +2,9 @@
 
 namespace Wallabag\CoreBundle\Tests\Command;
 
-use Wallabag\CoreBundle\Tests\WallabagTestCase;
+use Wallabag\CoreBundle\Tests\WallabagCoreTestCase;
 use Wallabag\CoreBundle\Command\InstallCommand;
+use Wallabag\CoreBundle\Tests\Mock\InstallCommandMock;
 use Symfony\Bundle\FrameworkBundle\Console\Application;
 use Symfony\Component\Console\Tester\CommandTester;
 use Symfony\Component\Console\Input\ArrayInput;
@@ -11,7 +12,7 @@ use Symfony\Component\Console\Output\NullOutput;
 use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand;
 use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand;
 
-class InstallCommandTest extends WallabagTestCase
+class InstallCommandTest extends WallabagCoreTestCase
 {
     public static function tearDownAfterClass()
     {
@@ -30,7 +31,7 @@ class InstallCommandTest extends WallabagTestCase
         $this->container = static::$kernel->getContainer();
 
         $application = new Application(static::$kernel);
-        $application->add(new InstallCommand());
+        $application->add(new InstallCommandMock());
 
         $command = $application->find('wallabag:install');
 
@@ -64,7 +65,7 @@ class InstallCommandTest extends WallabagTestCase
         $this->container = static::$kernel->getContainer();
 
         $application = new Application(static::$kernel);
-        $application->add(new InstallCommand());
+        $application->add(new InstallCommandMock());
 
         $command = $application->find('wallabag:install');
 
@@ -97,6 +98,9 @@ class InstallCommandTest extends WallabagTestCase
         $this->assertContains('Droping database, creating database and schema', $tester->getDisplay());
     }
 
+    /**
+     * @group command-doctrine
+     */
     public function testRunInstallCommandWithDatabaseRemoved()
     {
         $this->container = static::$kernel->getContainer();
@@ -148,7 +152,7 @@ class InstallCommandTest extends WallabagTestCase
         $this->container = static::$kernel->getContainer();
 
         $application = new Application(static::$kernel);
-        $application->add(new InstallCommand());
+        $application->add(new InstallCommandMock());
 
         $command = $application->find('wallabag:install');
 
@@ -181,6 +185,9 @@ class InstallCommandTest extends WallabagTestCase
         $this->assertContains('Droping schema and creating schema', $tester->getDisplay());
     }
 
+    /**
+     * @group command-doctrine
+     */
     public function testRunInstallCommandChooseNothing()
     {
         $this->container = static::$kernel->getContainer();
@@ -242,7 +249,7 @@ class InstallCommandTest extends WallabagTestCase
         $this->container = static::$kernel->getContainer();
 
         $application = new Application(static::$kernel);
-        $application->add(new InstallCommand());
+        $application->add(new InstallCommandMock());
 
         $command = $application->find('wallabag:install');