[SecurityBundle] Fix execution of functional tests with different names

Using "securitybundletest" as the default environment for the functional test's kernel causes a PHP fatal error redeclaring the class "appSecuritybundletestDebugProjectContainer" when multiple tests (with unique names) are executed. In lieu of forcing tests to specify their own environment explicitly, we can simply append the test name into the environment.

Note: this bug may be related to PHPUnit executing multiple tests within the same process.
This commit is contained in:
Jeremy Mikola 2011-12-30 20:37:35 -05:00
parent 66722b3d2e
commit 4837407527

View File

@ -60,7 +60,7 @@ class WebTestCase extends BaseWebTestCase
return new $class(
$options['test_case'],
isset($options['root_config']) ? $options['root_config'] : 'config.yml',
isset($options['environment']) ? $options['environment'] : 'securitybundletest',
isset($options['environment']) ? $options['environment'] : 'securitybundletest' . strtolower($options['test_case']),
isset($options['debug']) ? $options['debug'] : true
);
}