Changeset 174 for trunk/trax/test/ActionControllerTest.php
- Timestamp:
- 03/13/06 21:10:15 (6 years ago)
- Files:
-
- 1 modified
-
trunk/trax/test/ActionControllerTest.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/trax/test/ActionControllerTest.php
r163 r174 100 100 $ac = new ActionController; 101 101 // this URL doesn't match any route 102 $_SERVER['REDIRECT_URL'] = ' ~haas/foo/bar';102 $_SERVER['REDIRECT_URL'] = '/~haas/foo/bar'; 103 103 $this->assertFalse($ac->recognize_route()); 104 104 // this URL matches but the controller doesn't exist 105 $_SERVER['REDIRECT_URL'] = ' ~haas/nocontroller/foo/bar';105 $_SERVER['REDIRECT_URL'] = '/~haas/nocontroller/foo/bar'; 106 106 $this->assertFalse($ac->recognize_route()); 107 107 // this URL matches and the controller is where it should be 108 $_SERVER['REDIRECT_URL'] = ' ~haas/products/bar';108 $_SERVER['REDIRECT_URL'] = '/~haas/products/bar'; 109 109 $this->assertTrue($ac->recognize_route()); 110 110 } … … 155 155 $ac = new ActionController; 156 156 // this URL doesn't match any route 157 $_SERVER['REDIRECT_URL'] = ' ~haas/foo/bar';157 $_SERVER['REDIRECT_URL'] = '/~haas/foo/bar'; 158 158 try { 159 159 $ac->process_route(); … … 180 180 $ac = new ActionController; 181 181 // this URL matches default route 182 $_SERVER['REDIRECT_URL'] = ' ~haas/nocontroller/foo/bar';182 $_SERVER['REDIRECT_URL'] = '/~haas/nocontroller/foo/bar'; 183 183 try { 184 184 $ac->process_route(); … … 207 207 // this URL matches default route, but the controller 208 208 // file doesn't have a Noclass class 209 $_SERVER['REDIRECT_URL'] = ' ~haas/noclass/foo/bar';209 $_SERVER['REDIRECT_URL'] = '/~haas/noclass/foo/bar'; 210 210 try { 211 211 $ac->process_route(); … … 234 234 // $ac = new ActionController; 235 235 // // should invoke CatalogController 236 // $_SERVER['REDIRECT_URL'] = ' ~haas/products/bar';236 // $_SERVER['REDIRECT_URL'] = '/~haas/products/bar'; 237 237 // $ac->process_route(); 238 238 // // Remove the following line when you implement this test.
