]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - tests/Wallabag/CoreBundle/WallabagCoreTestCase.php
fixup! Debug MySQL failing
[github/wallabag/wallabag.git] / tests / Wallabag / CoreBundle / WallabagCoreTestCase.php
index 816d22f4d8d303e627baa2bd3d041b0e23d7a27c..50361039ebd14a3f8d7e36f3bb0cf8f595aec5a1 100644 (file)
@@ -7,6 +7,7 @@ use Symfony\Bundle\FrameworkBundle\Console\Application;
 use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
 use Symfony\Component\BrowserKit\Cookie;
 use Symfony\Component\Console\Input\ArrayInput;
+use Symfony\Component\Console\Output\BufferedOutput;
 use Symfony\Component\Console\Output\NullOutput;
 use Wallabag\CoreBundle\Entity\Config;
 use Wallabag\UserBundle\Entity\User;
@@ -40,24 +41,42 @@ abstract class WallabagCoreTestCase extends WebTestCase
         $application = new Application($client->getKernel());
         $application->setAutoExit(false);
 
-        $application->run(new ArrayInput([
+        $output = new BufferedOutput();
+        $exitCode = $application->run(new ArrayInput([
             'command' => 'doctrine:schema:drop',
             '--no-interaction' => true,
             '--force' => true,
             '--env' => 'test',
-        ]), new NullOutput());
+        ]), $output);
 
-        $application->run(new ArrayInput([
+        if (0 !== $exitCode) {
+            var_dump('doctrine:schema:drop');
+            var_export($output->fetch()); die();
+        }
+
+        $output = new BufferedOutput();
+        $exitCode = $application->run(new ArrayInput([
             'command' => 'doctrine:schema:create',
             '--no-interaction' => true,
             '--env' => 'test',
-        ]), new NullOutput());
+        ]), $output);
+
+        if (0 !== $exitCode) {
+            var_dump('doctrine:schema:create');
+            var_export($output->fetch()); die();
+        }
 
-        $application->run(new ArrayInput([
+        $output = new BufferedOutput();
+        $exitCode = $application->run(new ArrayInput([
             'command' => 'doctrine:fixtures:load',
             '--no-interaction' => true,
             '--env' => 'test',
-        ]), new NullOutput());
+        ]), $output);
+
+        if (0 !== $exitCode) {
+            var_dump('doctrine:fixtures:load');
+            var_export($output->fetch()); die();
+        }
 
         /*
          * Recreate client to avoid error: