Skip to content

Commit

Permalink
Merge pull request #4 from kokspflanze/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
kokspflanze authored Sep 5, 2016
2 parents af82d38 + 204b31c commit b267e2f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/BjyAuthorize/Guard/Route.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,8 @@ public function onRoute(MvcEvent $event)

/* @var $app \Zend\Mvc\Application */
$app = $event->getTarget();

$app->getEventManager()->trigger(MvcEvent::EVENT_DISPATCH_ERROR, $event);
$eventManager = $app->getEventManager();
$eventManager->setEventPrototype($event);
$eventManager->trigger(MvcEvent::EVENT_DISPATCH_ERROR, null, $event->getParams());
}
}
2 changes: 1 addition & 1 deletion tests/BjyAuthorizeTest/Guard/RouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ public function testOnRouteWithInvalidResource()
->getEventManager()
->expects($this->once())
->method('trigger')
->with(MvcEvent::EVENT_DISPATCH_ERROR, $event);
->with(MvcEvent::EVENT_DISPATCH_ERROR, null, $event->getParams());

$this->assertNull($this->routeGuard->onRoute($event), 'Does not stop event propagation');
}
Expand Down

0 comments on commit b267e2f

Please sign in to comment.