aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-04-12 11:36:01 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-04-12 12:25:29 +0200
commit4094ea47712efbe58624ff74daeb1f77c9b0edcf (patch)
tree3d2c168092d0208e6ba888de969252a54bf0c6c1 /src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
parent7eccbda99f16dc39ee01a0c81ab88293e9b268fd (diff)
downloadwallabag-4094ea47712efbe58624ff74daeb1f77c9b0edcf.tar.gz
wallabag-4094ea47712efbe58624ff74daeb1f77c9b0edcf.tar.zst
wallabag-4094ea47712efbe58624ff74daeb1f77c9b0edcf.zip
Convert array + phpDoc
Thanks for https://github.com/thomasbachem/php-short-array-syntax-converter
Diffstat (limited to 'src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php')
-rw-r--r--src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
index bd61f750..0673d581 100644
--- a/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
+++ b/src/Wallabag/CoreBundle/Tests/Command/InstallCommandTest.php
@@ -37,11 +37,11 @@ class InstallCommandTest extends WallabagCoreTestCase
37 $application = new Application(static::$kernel); 37 $application = new Application(static::$kernel);
38 $application->setAutoExit(false); 38 $application->setAutoExit(false);
39 39
40 $code = $application->run(new ArrayInput(array( 40 $code = $application->run(new ArrayInput([
41 'command' => 'doctrine:fixtures:load', 41 'command' => 'doctrine:fixtures:load',
42 '--no-interaction' => true, 42 '--no-interaction' => true,
43 '--env' => 'test', 43 '--env' => 'test',
44 )), new NullOutput()); 44 ]), new NullOutput());
45 } 45 }
46 46
47 public function testRunInstallCommand() 47 public function testRunInstallCommand()
@@ -63,9 +63,9 @@ class InstallCommandTest extends WallabagCoreTestCase
63 $command->getHelperSet()->set($question, 'question'); 63 $command->getHelperSet()->set($question, 'question');
64 64
65 $tester = new CommandTester($command); 65 $tester = new CommandTester($command);
66 $tester->execute(array( 66 $tester->execute([
67 'command' => $command->getName(), 67 'command' => $command->getName(),
68 )); 68 ]);
69 69
70 $this->assertContains('Checking system requirements.', $tester->getDisplay()); 70 $this->assertContains('Checking system requirements.', $tester->getDisplay());
71 $this->assertContains('Setting up database.', $tester->getDisplay()); 71 $this->assertContains('Setting up database.', $tester->getDisplay());
@@ -93,10 +93,10 @@ class InstallCommandTest extends WallabagCoreTestCase
93 $command->getHelperSet()->set($question, 'question'); 93 $command->getHelperSet()->set($question, 'question');
94 94
95 $tester = new CommandTester($command); 95 $tester = new CommandTester($command);
96 $tester->execute(array( 96 $tester->execute([
97 'command' => $command->getName(), 97 'command' => $command->getName(),
98 '--reset' => true, 98 '--reset' => true,
99 )); 99 ]);
100 100
101 $this->assertContains('Checking system requirements.', $tester->getDisplay()); 101 $this->assertContains('Checking system requirements.', $tester->getDisplay());
102 $this->assertContains('Setting up database.', $tester->getDisplay()); 102 $this->assertContains('Setting up database.', $tester->getDisplay());
@@ -116,10 +116,10 @@ class InstallCommandTest extends WallabagCoreTestCase
116 116
117 // drop database first, so the install command won't ask to reset things 117 // drop database first, so the install command won't ask to reset things
118 $command = $application->find('doctrine:database:drop'); 118 $command = $application->find('doctrine:database:drop');
119 $command->run(new ArrayInput(array( 119 $command->run(new ArrayInput([
120 'command' => 'doctrine:database:drop', 120 'command' => 'doctrine:database:drop',
121 '--force' => true, 121 '--force' => true,
122 )), new NullOutput()); 122 ]), new NullOutput());
123 123
124 // start a new application to avoid lagging connexion to pgsql 124 // start a new application to avoid lagging connexion to pgsql
125 $client = static::createClient(); 125 $client = static::createClient();
@@ -140,9 +140,9 @@ class InstallCommandTest extends WallabagCoreTestCase
140 $command->getHelperSet()->set($question, 'question'); 140 $command->getHelperSet()->set($question, 'question');
141 141
142 $tester = new CommandTester($command); 142 $tester = new CommandTester($command);
143 $tester->execute(array( 143 $tester->execute([
144 'command' => $command->getName(), 144 'command' => $command->getName(),
145 )); 145 ]);
146 146
147 $this->assertContains('Checking system requirements.', $tester->getDisplay()); 147 $this->assertContains('Checking system requirements.', $tester->getDisplay());
148 $this->assertContains('Setting up database.', $tester->getDisplay()); 148 $this->assertContains('Setting up database.', $tester->getDisplay());
@@ -178,9 +178,9 @@ class InstallCommandTest extends WallabagCoreTestCase
178 $command->getHelperSet()->set($question, 'question'); 178 $command->getHelperSet()->set($question, 'question');
179 179
180 $tester = new CommandTester($command); 180 $tester = new CommandTester($command);
181 $tester->execute(array( 181 $tester->execute([
182 'command' => $command->getName(), 182 'command' => $command->getName(),
183 )); 183 ]);
184 184
185 $this->assertContains('Checking system requirements.', $tester->getDisplay()); 185 $this->assertContains('Checking system requirements.', $tester->getDisplay());
186 $this->assertContains('Setting up database.', $tester->getDisplay()); 186 $this->assertContains('Setting up database.', $tester->getDisplay());
@@ -201,19 +201,19 @@ class InstallCommandTest extends WallabagCoreTestCase
201 // drop database first, so the install command won't ask to reset things 201 // drop database first, so the install command won't ask to reset things
202 $command = new DropDatabaseDoctrineCommand(); 202 $command = new DropDatabaseDoctrineCommand();
203 $command->setApplication($application); 203 $command->setApplication($application);
204 $command->run(new ArrayInput(array( 204 $command->run(new ArrayInput([
205 'command' => 'doctrine:database:drop', 205 'command' => 'doctrine:database:drop',
206 '--force' => true, 206 '--force' => true,
207 )), new NullOutput()); 207 ]), new NullOutput());
208 208
209 $this->getClient()->getContainer()->get('doctrine')->getConnection()->close(); 209 $this->getClient()->getContainer()->get('doctrine')->getConnection()->close();
210 210
211 $command = new CreateDatabaseDoctrineCommand(); 211 $command = new CreateDatabaseDoctrineCommand();
212 $command->setApplication($application); 212 $command->setApplication($application);
213 $command->run(new ArrayInput(array( 213 $command->run(new ArrayInput([
214 'command' => 'doctrine:database:create', 214 'command' => 'doctrine:database:create',
215 '--env' => 'test', 215 '--env' => 'test',
216 )), new NullOutput()); 216 ]), new NullOutput());
217 217
218 $command = $application->find('wallabag:install'); 218 $command = $application->find('wallabag:install');
219 219
@@ -233,9 +233,9 @@ class InstallCommandTest extends WallabagCoreTestCase
233 $command->getHelperSet()->set($question, 'question'); 233 $command->getHelperSet()->set($question, 'question');
234 234
235 $tester = new CommandTester($command); 235 $tester = new CommandTester($command);
236 $tester->execute(array( 236 $tester->execute([
237 'command' => $command->getName(), 237 'command' => $command->getName(),
238 )); 238 ]);
239 239
240 $this->assertContains('Checking system requirements.', $tester->getDisplay()); 240 $this->assertContains('Checking system requirements.', $tester->getDisplay());
241 $this->assertContains('Setting up database.', $tester->getDisplay()); 241 $this->assertContains('Setting up database.', $tester->getDisplay());
@@ -265,10 +265,10 @@ class InstallCommandTest extends WallabagCoreTestCase
265 $command->getHelperSet()->set($question, 'question'); 265 $command->getHelperSet()->set($question, 'question');
266 266
267 $tester = new CommandTester($command); 267 $tester = new CommandTester($command);
268 $tester->execute(array( 268 $tester->execute([
269 'command' => $command->getName(), 269 'command' => $command->getName(),
270 '--no-interaction' => true, 270 '--no-interaction' => true,
271 )); 271 ]);
272 272
273 $this->assertContains('Checking system requirements.', $tester->getDisplay()); 273 $this->assertContains('Checking system requirements.', $tester->getDisplay());
274 $this->assertContains('Setting up database.', $tester->getDisplay()); 274 $this->assertContains('Setting up database.', $tester->getDisplay());