Permalink
Browse files

Merge branch 'hotfix/3936' into develop

Forward port #3936
  • Loading branch information...
2 parents f945302 + 8e2538b commit 6b5994d1e2be1608a433a4e2a6f64209de96da95 @weierophinney weierophinney committed Mar 11, 2013
Showing with 2 additions and 7 deletions.
  1. +2 −7 library/Zend/Test/PHPUnit/Controller/AbstractControllerTestCase.php
View
9 library/Zend/Test/PHPUnit/Controller/AbstractControllerTestCase.php
@@ -15,7 +15,6 @@
use Zend\Http\Request as HttpRequest;
use Zend\Mvc\Application;
use Zend\Mvc\MvcEvent;
-use Zend\Mvc\SendResponseListener;
use Zend\Stdlib\Exception\LogicException;
use Zend\Stdlib\Parameters;
use Zend\Stdlib\ResponseInterface;
@@ -154,12 +153,8 @@ public function getApplication()
$this->application = Application::init($appConfig);
$events = $this->application->getEventManager();
- foreach ($events->getListeners(MvcEvent::EVENT_FINISH) as $listener) {
- $callback = $listener->getCallback();
- if (is_array($callback) && $callback[0] instanceof SendResponseListener) {
- $events->detach($listener);
- }
- }
+ $events->detach($this->application->getServiceManager()->get('SendResponseListener'));
+
return $this->application;
}

0 comments on commit 6b5994d

Please sign in to comment.