From 6abd590fb506915873dc80a9c5b775ace5e430d1 Mon Sep 17 00:00:00 2001 From: franck Date: Fri, 16 Aug 2013 12:28:26 +0200 Subject: [PATCH] Fixed Image tests --- core/lib/Thelia/Tests/Action/ImageTest.php | 9 ++++++--- phpunit.xml | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/core/lib/Thelia/Tests/Action/ImageTest.php b/core/lib/Thelia/Tests/Action/ImageTest.php index 195613c0b..1b20d9ee2 100644 --- a/core/lib/Thelia/Tests/Action/ImageTest.php +++ b/core/lib/Thelia/Tests/Action/ImageTest.php @@ -171,7 +171,9 @@ class ImageTest extends \PHPUnit_Framework_TestCase if ($config != null) $config->setValue($oldval)->save(); - $this->assertFileExists(THELIA_WEB_DIR."/cache/tests/test-image-1.png"); + $imgdir = ConfigQuery::read('image_cache_dir_from_web_root'); + + $this->assertFileExists(THELIA_WEB_DIR."/$imgdir/tests/test-image-1.png"); } /** @@ -198,7 +200,9 @@ class ImageTest extends \PHPUnit_Framework_TestCase if ($config != null) $config->setValue($oldval)->save(); - $this->assertFileExists(THELIA_WEB_DIR."/cache/tests/test-image-9.png"); + $imgdir = ConfigQuery::read('image_cache_dir_from_web_root'); + + $this->assertFileExists(THELIA_WEB_DIR."/$imgdir/tests/test-image-9.png"); } /** @@ -367,5 +371,4 @@ class ImageTest extends \PHPUnit_Framework_TestCase $image->clearCache($event); } - } \ No newline at end of file diff --git a/phpunit.xml b/phpunit.xml index 3f800493b..1cad09b60 100755 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,7 +1,7 @@ -