Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Improve the remove of SendResponseListener #3936

Closed
wants to merge 1 commit into from

2 participants

@blanchonvincent

No description provided.

@weierophinney weierophinney was assigned
@weierophinney weierophinney referenced this pull request from a commit
@weierophinney weierophinney [#3936] CS fixes
- Trailing whitespace
dc7a41c
@curious-eyes curious-eyes referenced this pull request from a commit in curious-eyes/zf2
@weierophinney weierophinney [#3936] CS fixes
- Trailing whitespace
7614d86
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney [#3936] CS fixes
- Trailing whitespace
8e2538b
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/3936'
Close #3936
eac8997
@ghost Unknown referenced this pull request from a commit
@weierophinney weierophinney Merge branch 'hotfix/3936' into develop
Forward port #3936
6b5994d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 2, 2013
  1. @blanchonvincent
This page is out of date. Refresh to see the latest.
View
9 library/Zend/Test/PHPUnit/Controller/AbstractControllerTestCase.php
@@ -14,7 +14,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;
@@ -147,12 +146,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;
}
Something went wrong with that request. Please try again.