Skip to content

Commit

Permalink
fixed functional tests so that the cache/logs are specific to one ver…
Browse files Browse the repository at this point in the history
…sion of Symfony (to avoid weird side effects)
  • Loading branch information
fabpot committed Dec 17, 2011
1 parent 8579c63 commit f03692a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Expand Up @@ -13,6 +13,7 @@

use Symfony\Component\HttpKernel\Util\Filesystem;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
use Symfony\Component\HttpKernel\Kernel;

class WebTestCase extends BaseWebTestCase
{
Expand All @@ -33,7 +34,7 @@ protected function setUp()

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;
}

Expand Down
Expand Up @@ -80,12 +80,12 @@ public function getRootDir()

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)
Expand Down
Expand Up @@ -13,6 +13,7 @@

use Symfony\Component\HttpKernel\Util\Filesystem;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase as BaseWebTestCase;
use Symfony\Component\HttpKernel\Kernel;

class WebTestCase extends BaseWebTestCase
{
Expand All @@ -33,7 +34,7 @@ protected function setUp()

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;
}

Expand Down
Expand Up @@ -80,12 +80,12 @@ public function getRootDir()

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)
Expand Down

0 comments on commit f03692a

Please sign in to comment.