PATH:
opt
/
alt
/
tests
/
alt-php85-pecl-yaf_3.3.7-1.el8
/
tests
--TEST-- Check for Yaf_Route_Static with arbitrary urls --SKIPIF-- <?php if (!extension_loaded("yaf")) print "skip"; ?> --INI-- yaf.use_namespace=0 --FILE-- <?php $url = array( "/", "/foo", "/foo/", "/foo///bar", "foo/bar", "/foo/bar/", "/foo/bar/dummy", "/foo///bar/dummy/", "foo/bar/dummy/", "/my", "/my/", "/my/foo", "/my/foo/", "my/foo/bar", "my/foo/bar/", "/m/index/index", "/my/foo/bar/dummy/1", "my/foo/bar/dummy/1/a/2/////", "/my/index/index", "my/index", "/foo/index", "index/foo", "//foo///bar///p1////v1////p2/v2/", ); $config = array( "application" => array( "directory" => '/tmp/', "modules" => 'Index,My', ), ); $app = new Yaf_Application($config); $route = Yaf_Dispatcher::getInstance()->getRouter(); foreach ($url as $u) { $req = new Yaf_Request_Http($u); $route->route($req); echo $u, " : ", "m=>", $req->getModuleName(), " c=>", $req->getControllerName(), " a=>", $req->getActionName(); if (($args = $req->getParams())) { echo " args=>"; foreach ($args as $k => $v) { echo $k , "->", $v , ","; } } echo "\n"; } ini_set("yaf.action_prefer", 1); $url = array( "/", "/foo", "/foo/", "/my", "/my/", "/my/foo", "/my//foo/", ); foreach ($url as $u) { $req = new Yaf_Request_Http($u); $route->route($req); echo $u, " : ", "m=>", $req->getModuleName(), " c=>", $req->getControllerName(), " a=>", $req->getActionName(); if (($args = $req->getParams())) { echo " args=>"; foreach ($args as $k => $v) { echo $k , "->", $v , ","; } } echo "\n"; } ?> --EXPECT-- / : m=> c=> a=> /foo : m=> c=>Foo a=> /foo/ : m=> c=>Foo a=> /foo///bar : m=> c=>Foo a=>bar foo/bar : m=> c=>Foo a=>bar /foo/bar/ : m=> c=>Foo a=>bar /foo/bar/dummy : m=> c=>Foo a=>bar args=>dummy->, /foo///bar/dummy/ : m=> c=>Foo a=>bar args=>dummy->, foo/bar/dummy/ : m=> c=>Foo a=>bar args=>dummy->, /my : m=> c=>My a=> /my/ : m=> c=>My a=> /my/foo : m=> c=>My a=>foo /my/foo/ : m=> c=>My a=>foo my/foo/bar : m=>My c=>Foo a=>bar my/foo/bar/ : m=>My c=>Foo a=>bar /m/index/index : m=> c=>M a=>index args=>index->, /my/foo/bar/dummy/1 : m=>My c=>Foo a=>bar args=>dummy->1, my/foo/bar/dummy/1/a/2///// : m=>My c=>Foo a=>bar args=>dummy->1,a->2, /my/index/index : m=>My c=>Index a=>index my/index : m=> c=>My a=>index /foo/index : m=> c=>Foo a=>index index/foo : m=> c=>Index a=>foo //foo///bar///p1////v1////p2/v2/ : m=> c=>Foo a=>bar args=>p1->,v1->,p2->v2, / : m=> c=> a=> /foo : m=> c=> a=>foo /foo/ : m=> c=> a=>foo /my : m=> c=> a=>my /my/ : m=> c=> a=>my /my/foo : m=> c=>My a=>foo /my//foo/ : m=> c=>My a=>foo
[-] bug61493.phpt
[edit]
[-] 080.phpt
[edit]
[-] 003.phpt
[edit]
[-] 079.phpt
[edit]
[-] issue297.phpt
[edit]
[-] 032.phpt
[edit]
[-] issue468.phpt
[edit]
[-] issue134.phpt
[edit]
[-] issue231.phpt
[edit]
[-] 108.phpt
[edit]
[-] 110.phpt
[edit]
[-] issue469.phpt
[edit]
[-] 042.phpt
[edit]
[-] bug70913.phpt
[edit]
[-] 001.phpt
[edit]
[-] 071.phpt
[edit]
[-] 059.phpt
[edit]
[-] issue311.phpt
[edit]
[-] 087.phpt
[edit]
[-] 006.phpt
[edit]
[-] 017.phpt
[edit]
[-] 105.phpt
[edit]
[-] 073.phpt
[edit]
[-] 099.phpt
[edit]
[-] 050.phpt
[edit]
[-] 109.phpt
[edit]
[-] 054.phpt
[edit]
[-] 045.phpt
[edit]
[-] 103.phpt
[edit]
[-] 069.phpt
[edit]
[-] 096.phpt
[edit]
[-] 049.phpt
[edit]
[-] 083.phpt
[edit]
[-] 038.phpt
[edit]
[-] 098.phpt
[edit]
[-] 107.phpt
[edit]
[-] 029.phpt
[edit]
[-] 075.phpt
[edit]
[-] 062.phpt
[edit]
[-] 007.phpt
[edit]
[-] 077.phpt
[edit]
[-] 106.phpt
[edit]
[-] 089.phpt
[edit]
[-] 014.phpt
[edit]
[-] 068.phpt
[edit]
[-] issue513.phpt
[edit]
[-] 012.phpt
[edit]
[-] 041.phpt
[edit]
[-] 010.phpt
[edit]
[-] 013.phpt
[edit]
[-] 030.phpt
[edit]
[-] 025.phpt
[edit]
[-] 088.phpt
[edit]
[-] issue535.phpt
[edit]
[-] 091.phpt
[edit]
[-] 035.phpt
[edit]
[-] issue163.phpt
[edit]
[-] bug63900.phpt
[edit]
[-] 086.phpt
[edit]
[-] 053.phpt
[edit]
[-] 004.phpt
[edit]
[-] 047.phpt
[edit]
[-] 018.phpt
[edit]
[-] 026.phpt
[edit]
[-] 097.phpt
[edit]
[-] 065.phpt
[edit]
[-] 027.phpt
[edit]
[-] 019.phpt
[edit]
[-] 020.phpt
[edit]
[-] 078.phpt
[edit]
[-] bug63381.phpt
[edit]
[-] 074.phpt
[edit]
[-] bug76217.phpt
[edit]
[+]
..
[-] 036.phpt
[edit]
[-] 055.phpt
[edit]
[-] bug63438.phpt
[edit]
[-] 002.phpt
[edit]
[-] build.inc
[edit]
[-] 084.phpt
[edit]
[-] 040.phpt
[edit]
[-] 081.phpt
[edit]
[-] 085.phpt
[edit]
[-] 009.phpt
[edit]
[-] 104.phpt
[edit]
[-] 094.phpt
[edit]
[-] issue530.phpt
[edit]
[-] 051.phpt
[edit]
[-] issue415.phpt
[edit]
[-] 037.phpt
[edit]
[-] multi-section.ini
[edit]
[-] 043.phpt
[edit]
[-] 031.phpt
[edit]
[-] 101.phpt
[edit]
[-] 005.phpt
[edit]
[-] 058.phpt
[edit]
[-] 066.phpt
[edit]
[-] issue420.phpt
[edit]
[-] 008.phpt
[edit]
[-] issue518.phpt
[edit]
[-] 102.phpt
[edit]
[-] 028.phpt
[edit]
[-] 011.phpt
[edit]
[-] 052.phpt
[edit]
[-] system.ini
[edit]
[-] 039.phpt
[edit]
[-] 044.phpt
[edit]
[-] 092.phpt
[edit]
[-] 057.phpt
[edit]
[-] bug62702.phpt
[edit]
[-] 064.phpt
[edit]
[-] 070.phpt
[edit]
[-] 061.phpt
[edit]
[-] 056.phpt
[edit]
[-] 090.phpt
[edit]
[-] 015.phpt
[edit]
[-] 046.phpt
[edit]
[-] 072.phpt
[edit]
[-] 063.phpt
[edit]
[-] issue303.phpt
[edit]
[-] 082.phpt
[edit]
[-] 022.phpt
[edit]
[-] 016.phpt
[edit]
[-] 033.phpt
[edit]
[-] 093.phpt
[edit]
[-] simple.ini
[edit]
[-] bug76213.phpt
[edit]
[-] issue232.phpt
[edit]
[-] 060.phpt
[edit]
[-] 021.phpt
[edit]
[-] 076.phpt
[edit]
[-] 023.phpt
[edit]
[-] 095.phpt
[edit]
[-] 100.phpt
[edit]
[-] 048.phpt
[edit]
[-] 067.phpt
[edit]
[-] 024.phpt
[edit]
[-] 034.phpt
[edit]