diff options
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | tests/Wallabag/CoreBundle/WallabagCoreTestCase.php | 31 |
2 files changed, 26 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml index ad997bcb..6656d53d 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -74,7 +74,7 @@ script: | |||
74 | 74 | ||
75 | - make fixtures | 75 | - make fixtures |
76 | 76 | ||
77 | - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then ./bin/simple-phpunit -v --debug --stop-on-failure ; fi; | 77 | - if [[ $VALIDATE_TRANSLATION_FILE = '' ]]; then SYMFONY_PHPUNIT_VERSION=7.0 ./bin/simple-phpunit -v --debug --stop-on-failure ; fi; |
78 | - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi; | 78 | - if [[ $CS_FIXER = run ]]; then php bin/php-cs-fixer fix --verbose --dry-run ; fi; |
79 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi; | 79 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations -v ; fi; |
80 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi; | 80 | - if [[ $VALIDATE_TRANSLATION_FILE = run ]]; then php bin/console lint:yaml app/Resources/CraueConfigBundle/translations -v ; fi; |
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; | |||
7 | use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; | 7 | use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; |
8 | use Symfony\Component\BrowserKit\Cookie; | 8 | use Symfony\Component\BrowserKit\Cookie; |
9 | use Symfony\Component\Console\Input\ArrayInput; | 9 | use Symfony\Component\Console\Input\ArrayInput; |
10 | use Symfony\Component\Console\Output\BufferedOutput; | ||
10 | use Symfony\Component\Console\Output\NullOutput; | 11 | use Symfony\Component\Console\Output\NullOutput; |
11 | use Wallabag\CoreBundle\Entity\Config; | 12 | use Wallabag\CoreBundle\Entity\Config; |
12 | use Wallabag\UserBundle\Entity\User; | 13 | use 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: |