aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
diff options
context:
space:
mode:
authorJeremy <jeremy.benoist@gmail.com>2015-03-28 21:45:35 +0100
committerJeremy <jeremy.benoist@gmail.com>2015-03-31 22:48:01 +0200
commit0ee043f745fc53d782528128c615aa24a6af1d24 (patch)
tree9ac6e40e10d078a0bbd87e69fb99a083fb29f2aa /src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
parent371ac69a6bd6325929e4efee7958682a6b1666f7 (diff)
downloadwallabag-0ee043f745fc53d782528128c615aa24a6af1d24.tar.gz
wallabag-0ee043f745fc53d782528128c615aa24a6af1d24.tar.zst
wallabag-0ee043f745fc53d782528128c615aa24a6af1d24.zip
Update InstallCommand test
They are god damn too long to execute because it launch external command (mostly related to doctrine). So I've added a PHPUnit @group (`command-doctrine`) so that we can avoid launching them on a regular basis, like that: `phpunit --exclude-group command-doctrine`
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php')
-rw-r--r--src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
index 64f6c329..f689b532 100644
--- a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
@@ -4,6 +4,7 @@ namespace Wallabag\CoreBundle\Tests\Command;
4 4
5use Wallabag\CoreBundle\Tests\WallabagTestCase; 5use Wallabag\CoreBundle\Tests\WallabagTestCase;
6use Wallabag\CoreBundle\Command\InstallCommand; 6use Wallabag\CoreBundle\Command\InstallCommand;
7use Wallabag\CoreBundle\Tests\Mock\InstallCommandMock;
7use Symfony\Bundle\FrameworkBundle\Console\Application; 8use Symfony\Bundle\FrameworkBundle\Console\Application;
8use Symfony\Component\Console\Tester\CommandTester; 9use Symfony\Component\Console\Tester\CommandTester;
9use Symfony\Component\Console\Input\ArrayInput; 10use Symfony\Component\Console\Input\ArrayInput;
@@ -30,7 +31,7 @@ class InstallCommandTest extends WallabagTestCase
30 $this->container = static::$kernel->getContainer(); 31 $this->container = static::$kernel->getContainer();
31 32
32 $application = new Application(static::$kernel); 33 $application = new Application(static::$kernel);
33 $application->add(new InstallCommand()); 34 $application->add(new InstallCommandMock());
34 35
35 $command = $application->find('wallabag:install'); 36 $command = $application->find('wallabag:install');
36 37
@@ -64,7 +65,7 @@ class InstallCommandTest extends WallabagTestCase
64 $this->container = static::$kernel->getContainer(); 65 $this->container = static::$kernel->getContainer();
65 66
66 $application = new Application(static::$kernel); 67 $application = new Application(static::$kernel);
67 $application->add(new InstallCommand()); 68 $application->add(new InstallCommandMock());
68 69
69 $command = $application->find('wallabag:install'); 70 $command = $application->find('wallabag:install');
70 71
@@ -97,6 +98,9 @@ class InstallCommandTest extends WallabagTestCase
97 $this->assertContains('Droping database, creating database and schema', $tester->getDisplay()); 98 $this->assertContains('Droping database, creating database and schema', $tester->getDisplay());
98 } 99 }
99 100
101 /**
102 * @group command-doctrine
103 */
100 public function testRunInstallCommandWithDatabaseRemoved() 104 public function testRunInstallCommandWithDatabaseRemoved()
101 { 105 {
102 $this->container = static::$kernel->getContainer(); 106 $this->container = static::$kernel->getContainer();
@@ -148,7 +152,7 @@ class InstallCommandTest extends WallabagTestCase
148 $this->container = static::$kernel->getContainer(); 152 $this->container = static::$kernel->getContainer();
149 153
150 $application = new Application(static::$kernel); 154 $application = new Application(static::$kernel);
151 $application->add(new InstallCommand()); 155 $application->add(new InstallCommandMock());
152 156
153 $command = $application->find('wallabag:install'); 157 $command = $application->find('wallabag:install');
154 158
@@ -181,6 +185,9 @@ class InstallCommandTest extends WallabagTestCase
181 $this->assertContains('Droping schema and creating schema', $tester->getDisplay()); 185 $this->assertContains('Droping schema and creating schema', $tester->getDisplay());
182 } 186 }
183 187
188 /**
189 * @group command-doctrine
190 */
184 public function testRunInstallCommandChooseNothing() 191 public function testRunInstallCommandChooseNothing()
185 { 192 {
186 $this->container = static::$kernel->getContainer(); 193 $this->container = static::$kernel->getContainer();
@@ -242,7 +249,7 @@ class InstallCommandTest extends WallabagTestCase
242 $this->container = static::$kernel->getContainer(); 249 $this->container = static::$kernel->getContainer();
243 250
244 $application = new Application(static::$kernel); 251 $application = new Application(static::$kernel);
245 $application->add(new InstallCommand()); 252 $application->add(new InstallCommandMock());
246 253
247 $command = $application->find('wallabag:install'); 254 $command = $application->find('wallabag:install');
248 255