Skip to content

Commit

Permalink
added LocalAppKernel for running tests with custom settings
Browse files Browse the repository at this point in the history
  • Loading branch information
craue committed Feb 23, 2015
1 parent 53006bd commit f182eb4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions Tests/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/cache
/LocalAppKernel.php
/logs
8 changes: 7 additions & 1 deletion Tests/IntegrationTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ abstract class IntegrationTestCase extends WebTestCase {
* {@inheritDoc}
*/
protected static function createKernel(array $options = array()) {
return new AppKernel(isset($options['config']) ? $options['config'] : 'config.yml');
$configFile = isset($options['config']) ? $options['config'] : 'config.yml';

if (class_exists('Craue\FormFlowBundle\Tests\LocalAppKernel')) {
return new LocalAppKernel($configFile);
}

return new AppKernel($configFile);
}

/**
Expand Down

0 comments on commit f182eb4

Please sign in to comment.