1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Index: tests/Zend/Navigation/Page/MvcTest.php
===================================================================
--- tests/Zend/Navigation/Page/MvcTest.php	(revision 24030)
+++ tests/Zend/Navigation/Page/MvcTest.php	(working copy)
@@ -200,6 +200,40 @@
         $this->assertEquals(false, $page->isActive());
     }

+    public function testIsActiveIsRouteAware()
+    {
+        $page = new Zend_Navigation_Page_Mvc(array(
+            'label' => 'foo',
+            'action' => 'myaction',
+            'route' => 'myroute',
+            'params' => array(
+                'page' => 1337
+            )
+        ));
+
+        $this->_front->getRouter()->addRoute(
+            'myroute',
+            new Zend_Controller_Router_Route(
+                'lolcat/:action/:page',
+                array(
+                    'module'     => 'default',
+                    'controller' => 'foobar',
+                    'action'     => 'bazbat',
+                    'page'       => 1
+                )
+            )
+        );
+
+        $this->_front->getRequest()->setParams(array(
+            'module' => 'default',
+            'controller' => 'foobar',
+            'action' => 'myaction',
+            'page' => 1337
+        ));
+
+        $this->assertEquals(true, $page->isActive());
+    }
+
     public function testActionAndControllerAccessors()
     {
         $page = new Zend_Navigation_Page_Mvc(array(