Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/3543' into develop
Browse files Browse the repository at this point in the history
Close #3543
  • Loading branch information
weierophinney committed Jan 25, 2013
2 parents c01501b + edfae48 commit d76e68e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
4 changes: 0 additions & 4 deletions library/Zend/Http/PhpEnvironment/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ public function headersSent()

/**
* @return bool
* @deprecated
*/
public function contentSent()
{
Expand All @@ -80,7 +79,6 @@ public function contentSent()
* Send HTTP headers
*
* @return Response
* @deprecated
*/
public function sendHeaders()
{
Expand Down Expand Up @@ -108,7 +106,6 @@ public function sendHeaders()
* Send content
*
* @return Response
* @deprecated
*/
public function sendContent()
{
Expand All @@ -125,7 +122,6 @@ public function sendContent()
* Send HTTP response
*
* @return Response
* @deprecated
*/
public function send()
{
Expand Down
11 changes: 10 additions & 1 deletion library/Zend/Mvc/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Zend\EventManager\EventManagerInterface;
use Zend\ServiceManager\ServiceManager;
use Zend\Stdlib\ResponseInterface;
use Zend\Stdlib\Nop;

/**
* Main application class for invoking applications
Expand Down Expand Up @@ -304,8 +305,16 @@ public function run()

$response = $this->getResponse();
$event->setResponse($response);
$this->completeRequest($event);

return $this->completeRequest($event);
return $this;
}

/**
* @deprecated
*/
public function send()
{
}

/**
Expand Down
3 changes: 2 additions & 1 deletion tests/ZendTest/Mvc/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,8 @@ public function testFinishEventIsTriggeredAfterDispatching()
$this->application->getEventManager()->attach(MvcEvent::EVENT_FINISH, function ($e) {
return $e->getResponse()->setContent($e->getResponse()->getBody() . 'foobar');
});
$this->assertContains('foobar', $this->application->run()->getBody(), 'The "finish" event was not triggered ("foobar" not in response)');
$this->application->run();
$this->assertContains('foobar', $this->application->getResponse()->getBody(), 'The "finish" event was not triggered ("foobar" not in response)');
}

/**
Expand Down

0 comments on commit d76e68e

Please sign in to comment.