From 85972ca4fe1fbb1aa436a8c4f87116294ffdb2ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Sun, 12 Oct 2014 20:59:41 +0200 Subject: [PATCH] add cache warmup before excuting tests --- .travis.yml | 4 +++- Tests/Fixtures/App/console | 27 +++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 Tests/Fixtures/App/console diff --git a/.travis.yml b/.travis.yml index 0a461f0e8..78e808133 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,9 @@ php: - 5.6 - hhvm -install: composer install --dev +install: + - composer install --dev + - php Tests/Fixtures/App/console --env=test cache:warmup script: phpunit --coverage-text diff --git a/Tests/Fixtures/App/console b/Tests/Fixtures/App/console new file mode 100644 index 000000000..2b45f964b --- /dev/null +++ b/Tests/Fixtures/App/console @@ -0,0 +1,27 @@ +#!/usr/bin/env php +getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev'); +$debug = getenv('SYMFONY_DEBUG') !== '0' && !$input->hasParameterOption(array('--no-debug', '')) && $env !== 'prod'; + +if ($debug) { + Debug::enable(); +} + +$kernel = new AppKernel($env, $debug); +$application = new Application($kernel); +$application->run($input);