From cee8ba6b5596d7a37621aec60cca8721dc00bc88 Mon Sep 17 00:00:00 2001 From: Eric GELOEN Date: Thu, 24 Nov 2011 14:38:52 +0100 Subject: [PATCH] Remove Emulation logs directory one time at the beggining of the test suite --- Tests/Emulation/WebTestCase.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Tests/Emulation/WebTestCase.php b/Tests/Emulation/WebTestCase.php index 545be136..7d0aaa54 100644 --- a/Tests/Emulation/WebTestCase.php +++ b/Tests/Emulation/WebTestCase.php @@ -18,7 +18,7 @@ class WebTestCase extends BaseWebTestCase protected static $initialize = array(); /** - * Remove emulation cache & logs directories + * Remove emulation cache & logs directories for the given environment * * @param string $environment */ @@ -28,7 +28,9 @@ protected static function initialize($environment) { $filesystem = new Filesystem(); $filesystem->remove(__DIR__.'/cache/'.$environment); - $filesystem->remove(__DIR__.'/logs'); + + if(empty(self::$initialize)) + $filesystem->remove(__DIR__.'/logs'); self::$initialize[$environment] = true; }