From ced94f9ca312a97ac215abc23d865f78bf04bdaf Mon Sep 17 00:00:00 2001 From: Blinden Date: Fri, 23 Nov 2012 18:50:05 +0100 Subject: [PATCH] Fixed #3051 * Added router and routeMatch to toArray method * Modified testToArrayMethod --- library/Zend/Navigation/Page/Mvc.php | 2 ++ tests/ZendTest/Navigation/Page/MvcTest.php | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/library/Zend/Navigation/Page/Mvc.php b/library/Zend/Navigation/Page/Mvc.php index eb0869015e3..eefcbcc0e8e 100644 --- a/library/Zend/Navigation/Page/Mvc.php +++ b/library/Zend/Navigation/Page/Mvc.php @@ -440,6 +440,8 @@ public function toArray() 'controller' => $this->getController(), 'params' => $this->getParams(), 'route' => $this->getRoute(), + 'router' => $this->getRouter(), + 'route_match' => $this->getRouteMatch(), ) ); } diff --git a/tests/ZendTest/Navigation/Page/MvcTest.php b/tests/ZendTest/Navigation/Page/MvcTest.php index 9c3689325e0..c9622688f37 100644 --- a/tests/ZendTest/Navigation/Page/MvcTest.php +++ b/tests/ZendTest/Navigation/Page/MvcTest.php @@ -418,7 +418,9 @@ public function testToArrayMethod() 'active' => true, 'visible' => false, 'foo' => 'bar', - 'meaning' => 42 + 'meaning' => 42, + 'router' => $this->router, + 'route_match' => $this->routeMatch, ); $page = new Page\Mvc($options);