Permalink
Browse files

[#3543] Fix failing test

- A test was calling run()->getBody(); modified to call run() prior, and then
  getResponse()->getBody().
  • Loading branch information...
1 parent 2ca646a commit edfae483e1d5c1eb7b87b0655862bcfa448a40b0 @weierophinney weierophinney committed Jan 25, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 tests/ZendTest/Mvc/ApplicationTest.php
View
3 tests/ZendTest/Mvc/ApplicationTest.php
@@ -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)');
}
/**

0 comments on commit edfae48

Please sign in to comment.