Skip to content

Commit

Permalink
Configure::read('App.wwwRoot') in camelBack.
Browse files Browse the repository at this point in the history
  • Loading branch information
euromark committed Nov 9, 2014
1 parent 7315ae6 commit f3c31c0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/View/Helper/UrlHelper.php
Expand Up @@ -155,7 +155,7 @@ public function webroot($file) {
$file = str_replace('/', '\\', $file);
}

if (file_exists(Configure::read('App.www_root') . $theme . $file)) {
if (file_exists(Configure::read('App.wwwRoot') . $theme . $file)) {
$webPath = $this->request->webroot . $theme . $asset[0];
} else {
$themePath = Plugin::path($this->theme);
Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase/View/Helper/HtmlHelperTest.php
Expand Up @@ -480,8 +480,8 @@ public function testImageTagWithTheme() {
* @return void
*/
public function testThemeAssetsInMainWebrootPath() {
$webRoot = Configure::read('App.www_root');
Configure::write('App.www_root', TEST_APP . 'webroot/');
$webRoot = Configure::read('App.wwwRoot');
Configure::write('App.wwwRoot', TEST_APP . 'webroot/');

$this->Html->Url->theme = 'TestTheme';
$result = $this->Html->css('webroot_test');
Expand Down
6 changes: 3 additions & 3 deletions tests/TestCase/View/Helper/UrlHelperTest.php
Expand Up @@ -261,8 +261,8 @@ public function testWebrootPaths() {
$expected = '/test_theme/img/test.jpg';
$this->assertEquals($expected, $result);

$webRoot = Configure::read('App.www_root');
Configure::write('App.www_root', TEST_APP . 'TestApp/webroot/');
$webRoot = Configure::read('App.wwwRoot');
Configure::write('App.wwwRoot', TEST_APP . 'TestApp/webroot/');

$result = $this->Helper->webroot('/img/cake.power.gif');
$expected = '/test_theme/img/cake.power.gif';
Expand All @@ -280,7 +280,7 @@ public function testWebrootPaths() {
$expected = '/img/cake.icon.gif?some=param';
$this->assertEquals($expected, $result);

Configure::write('App.www_root', $webRoot);
Configure::write('App.wwwRoot', $webRoot);
}

}

0 comments on commit f3c31c0

Please sign in to comment.