| @@ 892-907 (lines=16) @@ | ||
| 889 | ); |
|
| 890 | } |
|
| 891 | ||
| 892 | public function testLazyTrailingMatch() |
|
| 893 | { |
|
| 894 | $this->expectOutputString('this-is-a-title-123'); |
|
| 895 | ||
| 896 | $this->klein_app->respond( |
|
| 897 | '/posts/[*:title][i:id]', |
|
| 898 | function ($request) { |
|
| 899 | echo $request->param('title') |
|
| 900 | . $request->param('id'); |
|
| 901 | } |
|
| 902 | ); |
|
| 903 | ||
| 904 | $this->klein_app->dispatch( |
|
| 905 | MockRequestFactory::create('/posts/this-is-a-title-123') |
|
| 906 | ); |
|
| 907 | } |
|
| 908 | ||
| 909 | public function testFormatMatch() |
|
| 910 | { |
|
| @@ 966-981 (lines=16) @@ | ||
| 963 | ); |
|
| 964 | } |
|
| 965 | ||
| 966 | public function testControllerActionStyleRouteMatch() |
|
| 967 | { |
|
| 968 | $this->expectOutputString('donkey-kick'); |
|
| 969 | ||
| 970 | $this->klein_app->respond( |
|
| 971 | '/[:controller]?/[:action]?', |
|
| 972 | function ($request) { |
|
| 973 | echo $request->param('controller') |
|
| 974 | . '-' . $request->param('action'); |
|
| 975 | } |
|
| 976 | ); |
|
| 977 | ||
| 978 | $this->klein_app->dispatch( |
|
| 979 | MockRequestFactory::create('/donkey/kick') |
|
| 980 | ); |
|
| 981 | } |
|
| 982 | ||
| 983 | public function testRespondArgumentOrder() |
|
| 984 | { |
|