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

Commit

Permalink
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions src/PHPUnit/Controller/AbstractControllerTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit d7057b3

Please sign in to comment.