Skip to content

Commit

Permalink
Fixing the HtmlHelper tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed Feb 14, 2011
1 parent f8b51bf commit 396fbee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion lib/Cake/View/Helper/HtmlHelper.php
Expand Up @@ -944,7 +944,8 @@ public function loadConfig($configFile, $path = CONFIGS) {
}

$readerClass = Inflector::camelize($reader) . 'Reader';
if (!App::import('Lib', 'config/' . $readerClass)) {
App::uses($readerClass, 'Configure');
if (!class_exists($readerClass)) {
throw new ConfigureException(__('Cannot load the configuration file. Unknown reader.'));
}

Expand Down
5 changes: 2 additions & 3 deletions lib/Cake/tests/cases/libs/view/helpers/html.test.php
Expand Up @@ -16,7 +16,6 @@
* @since CakePHP(tm) v 1.2.0.4206
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
App::import('Core', array('Helper', 'AppHelper', 'ClassRegistry', 'Controller'));

App::uses('Helper', 'View');
App::uses('AppHelper', 'View/Helper');
Expand Down Expand Up @@ -1384,7 +1383,7 @@ function testCrumbList() {
*/

public function testLoadConfig() {
$path = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'config'. DS;
$path = LIBS . 'tests' . DS . 'test_app' . DS . 'config'. DS;

$result = $this->Html->loadConfig('htmlhelper_tags', $path);
$expected = array(
Expand Down Expand Up @@ -1424,7 +1423,7 @@ public function testLoadConfigWrongFile() {
* @expectedException ConfigureException
*/
public function testLoadConfigWrongReader() {
$path = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'config'. DS;
$path = LIBS . 'tests' . DS . 'test_app' . DS . 'config'. DS;
$result = $this->Html->loadConfig(array('htmlhelper_tags', 'wrong_reader'), $path);
}

Expand Down

0 comments on commit 396fbee

Please sign in to comment.