forked from laruence/yaf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
073.phpt
36 lines (31 loc) · 956 Bytes
/
073.phpt
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
--TEST--
Check for Yaf_Route_Rewrite::assemble
--SKIPIF--
<?php if (!extension_loaded("yaf")) print "skip"; ?>
--INI--
yaf.use_namespace=0
--FILE--
<?php
$router = new Yaf_Router();
$route = new Yaf_Route_Rewrite(
"/product/:name/:id/*",
array(
'controller' => "product",
),
array()
);
$router->addRoute("rewrite", $route);
var_dump($router->getRoute('rewrite')->assemble(
array(
':name' => 'foo',
':id' => 'bar',
':tmpkey1' => 'tmpval1'
),
array(
'tkey1' => 'tval1',
'tkey2' => 'tval2'
)
)
);
--EXPECTF--
string(57) "/product/foo/bar/tmpkey1/tmpval1/?tkey1=tval1&tkey2=tval2"