Changeset 1803
- Timestamp:
- 02/28/07 09:37:31 (23 months ago)
- Location:
- branches/0.11
- Files:
-
- 3 modified
-
src/routing/AgaviRouting.class.php (modified) (1 diff)
-
src/routing/AgaviWebRouting.class.php (modified) (1 diff)
-
tests2/routing/RoutingTest.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/0.11/src/routing/AgaviRouting.class.php
r1802 r1803 853 853 854 854 // set the list of matched route names as a request attribute 855 $req->setAttribute('matched Routes', $matchedRoutes, 'org.agavi.routing');855 $req->setAttribute('matched_routes', $matched_routes, 'org.agavi.routing'); 856 856 857 857 // return a list of matched route names -
branches/0.11/src/routing/AgaviWebRouting.class.php
r1759 r1803 213 213 if($route === null) { 214 214 if(AgaviConfig::get('core.use_routing')) { 215 $routes = array_reverse($req->getAttribute('matched Routes', 'org.agavi.routing'));215 $routes = array_reverse($req->getAttribute('matched_routes', 'org.agavi.routing')); 216 216 $route = join('+', $routes); 217 217 $routeMatches = array(); -
branches/0.11/tests2/routing/RoutingTest.php
r1750 r1803 46 46 $r->setInput('/anchor/child3/child2'); 47 47 $r->execute(); 48 $this->assertEquals(array('testWithChild', 't1child3'), $rq->getAttribute('matched Routes', 'org.agavi.routing'));48 $this->assertEquals(array('testWithChild', 't1child3'), $rq->getAttribute('matched_routes', 'org.agavi.routing')); 49 49 $this->assertEquals(3, count($rd->getParameters())); 50 50 $this->assertEquals('module3', $rd->getParameter('module')); … … 57 57 $r->setInput('/anchor/child4/nextChild'); 58 58 $r->execute(); 59 $this->assertEquals(array('testWithChild', 't1child4'), $rq->getAttribute('matched Routes', 'org.agavi.routing'));59 $this->assertEquals(array('testWithChild', 't1child4'), $rq->getAttribute('matched_routes', 'org.agavi.routing')); 60 60 $this->assertEquals(3, count($rd->getParameters())); 61 61 $this->assertEquals('module4', $rd->getParameter('module')); … … 68 68 $r->setInput('/anchor/child4/'); 69 69 $r->execute(); 70 $this->assertEquals(array('testWithChild', 't1child4'), $rq->getAttribute('matched Routes', 'org.agavi.routing'));70 $this->assertEquals(array('testWithChild', 't1child4'), $rq->getAttribute('matched_routes', 'org.agavi.routing')); 71 71 $this->assertEquals(3, count($rd->getParameters())); 72 72 $this->assertEquals('module4', $rd->getParameter('module')); … … 89 89 $r->setInput('/parent/category1/MACHINE/'); 90 90 $r->execute(); 91 $this->assertEquals(array('test2parent', 'test2child1'), $rq->getAttribute('matched Routes', 'org.agavi.routing'));91 $this->assertEquals(array('test2parent', 'test2child1'), $rq->getAttribute('matched_routes', 'org.agavi.routing')); 92 92 $this->assertEquals(4, count($rd->getParameters())); 93 93 $this->assertEquals('category1', $rd->getParameter('category')); … … 98 98 $r->setInput('/parent/MACHINE/'); 99 99 $r->execute(); 100 $this->assertEquals(array('test2parent', 'test2child1'), $rq->getAttribute('matched Routes', 'org.agavi.routing'));100 $this->assertEquals(array('test2parent', 'test2child1'), $rq->getAttribute('matched_routes', 'org.agavi.routing')); 101 101 $this->assertEquals(3, count($rd->getParameters())); 102 102 $this->assertEquals('MACHINE', $rd->getParameter('machine')); … … 106 106 $r->setInput('/parent/MACHINE'); 107 107 $r->execute(); 108 $this->assertEquals(array('test2parent', 'test2child1'), $rq->getAttribute('matched Routes', 'org.agavi.routing'));108 $this->assertEquals(array('test2parent', 'test2child1'), $rq->getAttribute('matched_routes', 'org.agavi.routing')); 109 109 $this->assertEquals(3, count($rd->getParameters())); 110 110 $this->assertEquals('MACHINE', $rd->getParameter('machine'));

