Skip to content

Commit

Permalink
Merge 45a8ca9 into 6a454cb
Browse files Browse the repository at this point in the history
  • Loading branch information
bakura10 committed Apr 5, 2014
2 parents 6a454cb + 45a8ca9 commit 24175af
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ZfrRest/Mvc/HttpExceptionListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public function onDispatchError(MvcEvent $event)

$event->setResponse($response);
$event->setResult($response);
$event->stopPropagation(true);
}

/**
Expand Down
2 changes: 2 additions & 0 deletions tests/ZfrRestTest/Mvc/HttpExceptionListenerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ public function testPopulateResponse()
$this->assertInstanceOf('Zend\Http\Response', $this->event->getResponse());
$this->assertInstanceOf('Zend\Http\Response', $this->event->getResult());
$this->assertEquals($expectedContent, json_decode($this->event->getResponse()->getContent(), true));
$this->assertTrue($this->event->propagationIsStopped());
}

public function testCanCreateFromCustomException()
Expand All @@ -109,5 +110,6 @@ public function testCanCreateFromCustomException()

$this->assertInstanceOf('Zend\Http\Response', $this->event->getResponse());
$this->assertEquals('An error', $this->event->getResponse()->getReasonPhrase());
$this->assertTrue($this->event->propagationIsStopped());
}
}

0 comments on commit 24175af

Please sign in to comment.