fixed functional tests so that the cache/logs are specific to one version of Symfony (to avoid weird side effects)
This commit is contained in:
parent
8579c6314b
commit
f03692a507
@ -13,6 +13,7 @@ namespace Symfony\Bundle\FrameworkBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Component\HttpKernel\Util\Filesystem;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
|
||||
class WebTestCase extends BaseWebTestCase
|
||||
{
|
||||
@ -33,7 +34,7 @@ class WebTestCase extends BaseWebTestCase
|
||||
|
||||
protected function deleteTmpDir($testCase)
|
||||
{
|
||||
if (!file_exists($dir = sys_get_temp_dir().'/'.$testCase)) {
|
||||
if (!file_exists($dir = sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$testCase)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -80,12 +80,12 @@ class AppKernel extends Kernel
|
||||
|
||||
public function getCacheDir()
|
||||
{
|
||||
return sys_get_temp_dir().'/'.$this->testCase.'/cache/'.$this->environment;
|
||||
return sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$this->testCase.'/cache/'.$this->environment;
|
||||
}
|
||||
|
||||
public function getLogDir()
|
||||
{
|
||||
return sys_get_temp_dir().'/'.$this->testCase.'/logs';
|
||||
return sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$this->testCase.'/logs';
|
||||
}
|
||||
|
||||
public function registerContainerConfiguration(LoaderInterface $loader)
|
||||
|
@ -13,6 +13,7 @@ namespace Symfony\Bundle\SecurityBundle\Tests\Functional;
|
||||
|
||||
use Symfony\Component\HttpKernel\Util\Filesystem;
|
||||
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
|
||||
use Symfony\Component\HttpKernel\Kernel;
|
||||
|
||||
class WebTestCase extends BaseWebTestCase
|
||||
{
|
||||
@ -33,7 +34,7 @@ class WebTestCase extends BaseWebTestCase
|
||||
|
||||
protected function deleteTmpDir($testCase)
|
||||
{
|
||||
if (!file_exists($dir = sys_get_temp_dir().'/'.$testCase)) {
|
||||
if (!file_exists($dir = sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$testCase)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -80,12 +80,12 @@ class AppKernel extends Kernel
|
||||
|
||||
public function getCacheDir()
|
||||
{
|
||||
return sys_get_temp_dir().'/'.$this->testCase.'/cache/'.$this->environment;
|
||||
return sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$this->testCase.'/cache/'.$this->environment;
|
||||
}
|
||||
|
||||
public function getLogDir()
|
||||
{
|
||||
return sys_get_temp_dir().'/'.$this->testCase.'/logs';
|
||||
return sys_get_temp_dir().'/'.Kernel::VERSION.'/'.$this->testCase.'/logs';
|
||||
}
|
||||
|
||||
public function registerContainerConfiguration(LoaderInterface $loader)
|
||||
|
Reference in New Issue
Block a user