Skip to content

Commit

Permalink
Finxing ThemeTest to be compatible with PHPUnit
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo committed May 9, 2010
1 parent c96b145 commit 8095500
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions cake/tests/cases/libs/view/theme.test.php
Expand Up @@ -294,7 +294,6 @@ function testMissingView() {

/**
* testMissingLayout method
*
* @access public
* @return void
*/
Expand All @@ -305,12 +304,10 @@ function testMissingLayout() {
$this->Controller->layout = 'whatever';
$this->Controller->theme = 'my_theme';

restore_error_handler();
$View =& new TestThemeView($this->Controller);
ob_start();
$result = $View->getLayoutFileName();
$expected = str_replace(array("\t", "\r\n", "\n"), "", ob_get_clean());
set_error_handler('simpleTestErrorHandler');
$this->assertPattern("/Missing Layout/", $expected);
$this->assertPattern("/views(\/|\\\)themed(\/|\\\)my_theme(\/|\\\)layouts(\/|\\\)whatever.ctp/", $expected);
}
Expand Down Expand Up @@ -338,7 +335,7 @@ function testMemoryLeakInPaths() {
$View->element('test_element');
}
$end = memory_get_usage();
$this->assertWithinMargin($start, $end, 3500);
$this->assertLessThanOrEqual($start + 3500, $end);
}
}
?>

0 comments on commit 8095500

Please sign in to comment.