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;
use Doctrine\Bundle\DoctrineBundle\Command\DropDatabaseDoctrineCommand;
use Doctrine\Bundle\DoctrineBundle\Command\CreateDatabaseDoctrineCommand;
-class InstallCommandTest extends WallabagTestCase
+class InstallCommandTest extends WallabagCoreTestCase
{
public static function tearDownAfterClass()
{
$this->container = static::$kernel->getContainer();
$application = new Application(static::$kernel);
- $application->add(new InstallCommand());
+ $application->add(new InstallCommandMock());
$command = $application->find('wallabag:install');
$this->container = static::$kernel->getContainer();
$application = new Application(static::$kernel);
- $application->add(new InstallCommand());
+ $application->add(new InstallCommandMock());
$command = $application->find('wallabag:install');
$this->assertContains('Droping database, creating database and schema', $tester->getDisplay());
}
+ /**
+ * @group command-doctrine
+ */
public function testRunInstallCommandWithDatabaseRemoved()
{
$this->container = static::$kernel->getContainer();
$this->container = static::$kernel->getContainer();
$application = new Application(static::$kernel);
- $application->add(new InstallCommand());
+ $application->add(new InstallCommandMock());
$command = $application->find('wallabag:install');
$this->assertContains('Droping schema and creating schema', $tester->getDisplay());
}
+ /**
+ * @group command-doctrine
+ */
public function testRunInstallCommandChooseNothing()
{
$this->container = static::$kernel->getContainer();
$this->container = static::$kernel->getContainer();
$application = new Application(static::$kernel);
- $application->add(new InstallCommand());
+ $application->add(new InstallCommandMock());
$command = $application->find('wallabag:install');