Browse Source

Relocating theme assets and updating tests

Jose Lorenzo Rodriguez 12 years ago
parent
commit
257c12bba7

+ 1 - 1
src/View/Helper.php

@@ -219,7 +219,7 @@ class Helper implements EventListener {
 				$file = str_replace('/', '\\', $file);
 				$file = str_replace('/', '\\', $file);
 			}
 			}
 
 
-			if (file_exists(Configure::read('App.www_root') . $theme . DS . $file)) {
+			if (file_exists(Configure::read('App.www_root') . $theme . $file)) {
 				$webPath = "{$this->request->webroot}" . $theme . $asset[0];
 				$webPath = "{$this->request->webroot}" . $theme . $asset[0];
 			} else {
 			} else {
 				$themePath = Plugin::path($this->theme);
 				$themePath = Plugin::path($this->theme);

+ 2 - 2
tests/TestCase/View/Helper/HtmlHelperTest.php

@@ -451,7 +451,7 @@ class HtmlHelperTest extends TestCase {
 		$result = $this->Html->image('__cake_test_image.gif');
 		$result = $this->Html->image('__cake_test_image.gif');
 		$this->assertTags($result, array(
 		$this->assertTags($result, array(
 			'img' => array(
 			'img' => array(
-				'src' => 'preg:/\/theme\/test_theme\/img\/__cake_test_image\.gif\?\d+/',
+				'src' => 'preg:/\/test_theme\/img\/__cake_test_image\.gif\?\d+/',
 				'alt' => ''
 				'alt' => ''
 		)));
 		)));
 
 
@@ -460,7 +460,7 @@ class HtmlHelperTest extends TestCase {
 
 
 		$this->assertTags($result, array(
 		$this->assertTags($result, array(
 			'img' => array(
 			'img' => array(
-				'src' => 'preg:/\/testing\/theme\/test_theme\/img\/__cake_test_image\.gif\?\d+/',
+				'src' => 'preg:/\/testing\/test_theme\/img\/__cake_test_image\.gif\?\d+/',
 				'alt' => ''
 				'alt' => ''
 		)));
 		)));
 	}
 	}

tests/test_app/webroot/theme/test_theme/css/theme_webroot.css → tests/test_app/webroot/test_theme/css/theme_webroot.css


tests/test_app/webroot/theme/test_theme/css/webroot_test.css → tests/test_app/webroot/test_theme/css/webroot_test.css


tests/test_app/webroot/theme/test_theme/img/cake.power.gif → tests/test_app/webroot/test_theme/img/cake.power.gif


tests/test_app/webroot/theme/test_theme/img/test.jpg → tests/test_app/webroot/test_theme/img/test.jpg