aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/Wallabag
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2018-10-29 13:45:26 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2018-10-29 13:45:26 +0100
commit2e1c165316102a622f6f57bcb3422aaa76962043 (patch)
tree06b759d9bde57908bf3ced46c7c70ea3e13ff594 /tests/Wallabag
parent5d50f77e34f2b61327482b7d198d554af1357cf2 (diff)
downloadwallabag-2e1c165316102a622f6f57bcb3422aaa76962043.tar.gz
wallabag-2e1c165316102a622f6f57bcb3422aaa76962043.tar.zst
wallabag-2e1c165316102a622f6f57bcb3422aaa76962043.zip
fixup! Debug MySQL failing
Diffstat (limited to 'tests/Wallabag')
-rw-r--r--tests/Wallabag/CoreBundle/WallabagCoreTestCase.php31
1 files changed, 25 insertions, 6 deletions
diff --git a/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php b/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php
index 816d22f4..50361039 100644
--- a/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php
+++ b/tests/Wallabag/CoreBundle/WallabagCoreTestCase.php
@@ -7,6 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Console\Application;
7use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; 7use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
8use Symfony\Component\BrowserKit\Cookie; 8use Symfony\Component\BrowserKit\Cookie;
9use Symfony\Component\Console\Input\ArrayInput; 9use Symfony\Component\Console\Input\ArrayInput;
10use Symfony\Component\Console\Output\BufferedOutput;
10use Symfony\Component\Console\Output\NullOutput; 11use Symfony\Component\Console\Output\NullOutput;
11use Wallabag\CoreBundle\Entity\Config; 12use Wallabag\CoreBundle\Entity\Config;
12use Wallabag\UserBundle\Entity\User; 13use Wallabag\UserBundle\Entity\User;
@@ -40,24 +41,42 @@ abstract class WallabagCoreTestCase extends WebTestCase
40 $application = new Application($client->getKernel()); 41 $application = new Application($client->getKernel());
41 $application->setAutoExit(false); 42 $application->setAutoExit(false);
42 43
43 $application->run(new ArrayInput([ 44 $output = new BufferedOutput();
45 $exitCode = $application->run(new ArrayInput([
44 'command' => 'doctrine:schema:drop', 46 'command' => 'doctrine:schema:drop',
45 '--no-interaction' => true, 47 '--no-interaction' => true,
46 '--force' => true, 48 '--force' => true,
47 '--env' => 'test', 49 '--env' => 'test',
48 ]), new NullOutput()); 50 ]), $output);
49 51
50 $application->run(new ArrayInput([ 52 if (0 !== $exitCode) {
53 var_dump('doctrine:schema:drop');
54 var_export($output->fetch()); die();
55 }
56
57 $output = new BufferedOutput();
58 $exitCode = $application->run(new ArrayInput([
51 'command' => 'doctrine:schema:create', 59 'command' => 'doctrine:schema:create',
52 '--no-interaction' => true, 60 '--no-interaction' => true,
53 '--env' => 'test', 61 '--env' => 'test',
54 ]), new NullOutput()); 62 ]), $output);
63
64 if (0 !== $exitCode) {
65 var_dump('doctrine:schema:create');
66 var_export($output->fetch()); die();
67 }
55 68
56 $application->run(new ArrayInput([ 69 $output = new BufferedOutput();
70 $exitCode = $application->run(new ArrayInput([
57 'command' => 'doctrine:fixtures:load', 71 'command' => 'doctrine:fixtures:load',
58 '--no-interaction' => true, 72 '--no-interaction' => true,
59 '--env' => 'test', 73 '--env' => 'test',
60 ]), new NullOutput()); 74 ]), $output);
75
76 if (0 !== $exitCode) {
77 var_dump('doctrine:fixtures:load');
78 var_export($output->fetch()); die();
79 }
61 80
62 /* 81 /*
63 * Recreate client to avoid error: 82 * Recreate client to avoid error: