From 56034e1184a30f4882beb20b411e81d532bfed79 Mon Sep 17 00:00:00 2001 From: franck Date: Thu, 15 Aug 2013 12:12:54 +0200 Subject: [PATCH] Fixed image test --- core/lib/Thelia/Tests/Action/ImageTest.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/lib/Thelia/Tests/Action/ImageTest.php b/core/lib/Thelia/Tests/Action/ImageTest.php index ce5e72a9c..2b7510449 100644 --- a/core/lib/Thelia/Tests/Action/ImageTest.php +++ b/core/lib/Thelia/Tests/Action/ImageTest.php @@ -76,12 +76,14 @@ class ImageTest extends \PHPUnit_Framework_TestCase public static function setUpBeforeClass() { $dir = THELIA_WEB_DIR."/cache/tests"; - if ($dh = opendir($dir)) { + if ($dh = @opendir($dir)) { while ($file = readdir($dh)) { if ($file == '.' || $file == '..') continue; unlink(sprintf("%s/%s", $dir, $file)); } + + closedir($dir); } }