diff --git a/lib/Cake/Test/Case/View/MediaViewTest.php b/lib/Cake/Test/Case/View/MediaViewTest.php index 514a6f434..d3b8dc70d 100644 --- a/lib/Cake/Test/Case/View/MediaViewTest.php +++ b/lib/Cake/Test/Case/View/MediaViewTest.php @@ -80,8 +80,7 @@ class MediaViewTest extends CakeTestCase { $this->MediaView->response->expects($this->once()) ->method('send'); - $result = $this->MediaView->render(); - $this->assertTrue($result); + $this->MediaView->render(); } /** @@ -119,8 +118,7 @@ class MediaViewTest extends CakeTestCase { $this->MediaView->response->expects($this->once()) ->method('send'); - $result = $this->MediaView->render(); - $this->assertTrue($result); + $this->MediaView->render(); } /** diff --git a/lib/Cake/Test/Case/View/ViewTest.php b/lib/Cake/Test/Case/View/ViewTest.php index b7fc2609c..2d2875286 100644 --- a/lib/Cake/Test/Case/View/ViewTest.php +++ b/lib/Cake/Test/Case/View/ViewTest.php @@ -1024,7 +1024,7 @@ class ViewTest extends CakeTestCase { $this->assertRegExp("/yo what up<\/title>/", $result); $this->assertRegExp("/<p><a href=\"flash\">yo what up<\/a><\/p>/", $result); - $this->assertTrue($View->render(false, 'flash')); + $this->assertNull($View->render(false, 'flash')); $this->PostsController->helpers = array('Session', 'Cache', 'Html'); $this->PostsController->constructClasses(); diff --git a/lib/Cake/View/MediaView.php b/lib/Cake/View/MediaView.php index 7a407dd96..4a7985086 100644 --- a/lib/Cake/View/MediaView.php +++ b/lib/Cake/View/MediaView.php @@ -62,7 +62,7 @@ class MediaView extends View { * * @param string $view Not used * @param string $layout Not used - * @return boolean + * @return void */ public function render($view = null, $layout = null) { $name = $download = $id = $modified = $path = $cache = $mimeType = $compress = null; @@ -94,7 +94,6 @@ class MediaView extends View { $this->response->compress(); } $this->response->send(); - return true; } } diff --git a/lib/Cake/View/View.php b/lib/Cake/View/View.php index f7153bc13..dfc1b4654 100644 --- a/lib/Cake/View/View.php +++ b/lib/Cake/View/View.php @@ -445,12 +445,12 @@ class View extends Object { * * @param string $view Name of view file to use * @param string $layout Layout to use. - * @return string Rendered Element + * @return string|null Rendered content or null if content already rendered and returned earlier. * @throws CakeException If there is an error in the view. */ public function render($view = null, $layout = null) { if ($this->hasRendered) { - return true; + return; } $this->Blocks->set('content', '');