Fixing the HtmlHelper tests

This commit is contained in:
José Lorenzo Rodríguez 2011-02-14 00:18:10 -04:30
parent f8b51bfd92
commit 396fbeec91
2 changed files with 4 additions and 4 deletions

View file

@ -944,7 +944,8 @@ class HtmlHelper extends AppHelper {
}
$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.'));
}

View file

@ -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');
@ -1384,7 +1383,7 @@ class HtmlHelperTest extends CakeTestCase {
*/
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(
@ -1424,7 +1423,7 @@ class HtmlHelperTest extends CakeTestCase {
* @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);
}