Skip to content

Commit

Permalink
Fix failing tests.
Browse files Browse the repository at this point in the history
* New properties on view caused fails in Debugger.
* Element cache keys have changed with the new refactoring.
  • Loading branch information
markstory committed Jul 7, 2012
1 parent 2967a4d commit 369bbcc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions lib/Cake/Test/Case/Utility/DebuggerTest.php
Expand Up @@ -327,6 +327,7 @@ public function testExportVar() {
request => object(CakeRequest) {}
response => object(CakeResponse) {}
elementCache => 'default'
elementCacheSettings => array()
int => (int) 2
float => (float) 1.333
}
Expand Down
8 changes: 4 additions & 4 deletions lib/Cake/Test/Case/View/ViewTest.php
Expand Up @@ -661,7 +661,7 @@ public function testElement() {
*
*/
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();

Expand Down Expand Up @@ -725,13 +725,13 @@ public function testElementCache() {
$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(
Expand All @@ -750,7 +750,7 @@ public function testElementCache() {
), 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');
Expand Down

0 comments on commit 369bbcc

Please sign in to comment.