forked from laruence/yaf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
006.phpt
43 lines (37 loc) · 902 Bytes
/
006.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
37
38
39
40
41
42
43
--TEST--
Check for Yaf_Route_Static
--SKIPIF--
<?php if (!extension_loaded("yaf")) print "skip"; ?>
--INI--
yaf.use_namespace=0
--FILE--
<?php
$request_uri = "/prefix/controller/action/name/laruence/age/28";
$base_uri = "/prefix/";
$request = new Yaf_Request_Http($request_uri, $base_uri);
unset($base_uri);
unset($request_uri);
$route = new Yaf_Route_Static();
var_dump($route->route($request));
print_r($request);
?>
--EXPECTF--
bool(true)
Yaf_Request_Http Object
(
[module] =>
[controller] => controller
[action] => action
[method] => Cli
[params:protected] => Array
(
[name] => laruence
[age] => 28
)
[language:protected] =>
[_exception:protected] =>
[_base_uri:protected] => /prefix/
[uri:protected] => /prefix/controller/action/name/laruence/age/28
[dispatched:protected] =>
[routed:protected] =>
)