Browse Source

Fix failing tests.

* New properties on view caused fails in Debugger.
* Element cache keys have changed with the new refactoring.
mark_story 13 years ago
parent
commit
369bbcc964

+ 1 - 0
lib/Cake/Test/Case/Utility/DebuggerTest.php

@@ -327,6 +327,7 @@ object(View) {
 	request => object(CakeRequest) {}
 	response => object(CakeResponse) {}
 	elementCache => 'default'
+	elementCacheSettings => array()
 	int => (int) 2
 	float => (float) 1.333
 }

+ 4 - 4
lib/Cake/Test/Case/View/ViewTest.php

@@ -661,7 +661,7 @@ class ViewTest extends CakeTestCase {
  *
  */
 	public function testElementCallbacks() {
-		$this->getMock('HtmlHelper', array(), array($this->View), 'ElementCallbackMockHtmlHelper');
+		$this->getMock('Helper', array(), array($this->View), 'ElementCallbackMockHtmlHelper');
 		$this->View->helpers = array('ElementCallbackMockHtml');
 		$this->View->loadHelpers();
 
@@ -725,13 +725,13 @@ class ViewTest extends CakeTestCase {
 		$expected = 'this is the test element';
 		$this->assertEquals($expected, $result);
 
-		$result = Cache::read('element__test_element_cache', 'test_view');
+		$result = Cache::read('element__test_element_cache_callbacks', 'test_view');
 		$this->assertEquals($expected, $result);
 
 		$result = $View->element('test_element', array('param' => 'one', 'foo' => 'two'), array('cache' => true));
 		$this->assertEquals($expected, $result);
 
-		$result = Cache::read('element__test_element_cache_param_foo', 'test_view');
+		$result = Cache::read('element__test_element_cache_callbacks_param_foo', 'test_view');
 		$this->assertEquals($expected, $result);
 
 		$result = $View->element('test_element', array(
@@ -750,7 +750,7 @@ class ViewTest extends CakeTestCase {
 		), array(
 			'cache' => array('config' => 'test_view'),
 		));
-		$result = Cache::read('element__test_element_cache_param_foo', 'test_view');
+		$result = Cache::read('element__test_element_cache_callbacks_param_foo', 'test_view');
 		$this->assertEquals($expected, $result);
 
 		Cache::clear(true, 'test_view');