@@ -14,44 +14,35 @@ class RouteMatchTest extends TestCase
14
14
{
15
15
public function testParamsAreStored ()
16
16
{
17
- $ match = new RouteMatch (['foo ' => 'bar ' ]);
17
+ $ match = new RouteMatch (null , ['foo ' => 'bar ' ]);
18
18
19
19
$ this ->assertEquals (['foo ' => 'bar ' ], $ match ->getParams ());
20
20
}
21
21
22
22
public function testMatchedRouteNameIsSet ()
23
23
{
24
- $ match = new RouteMatch ([]);
25
- $ match ->setMatchedRouteName ('foo ' );
24
+ $ match = new RouteMatch ('foo ' , []);
26
25
27
26
$ this ->assertEquals ('foo ' , $ match ->getMatchedRouteName ());
28
27
}
29
28
30
- public function testSetParam ()
31
- {
32
- $ match = new RouteMatch ([]);
33
- $ match ->setParam ('foo ' , 'bar ' );
34
-
35
- $ this ->assertEquals (['foo ' => 'bar ' ], $ match ->getParams ());
36
- }
37
-
38
29
public function testGetParam ()
39
30
{
40
- $ match = new RouteMatch (['foo ' => 'bar ' ]);
31
+ $ match = new RouteMatch (null , ['foo ' => 'bar ' ]);
41
32
42
33
$ this ->assertEquals ('bar ' , $ match ->getParam ('foo ' ));
43
34
}
44
35
45
36
public function testGetNonExistentParamWithoutDefault ()
46
37
{
47
- $ match = new RouteMatch ([]);
38
+ $ match = new RouteMatch (null , []);
48
39
49
40
$ this ->assertNull ($ match ->getParam ('foo ' ));
50
41
}
51
42
52
43
public function testGetNonExistentParamWithDefault ()
53
44
{
54
- $ match = new RouteMatch ([]);
45
+ $ match = new RouteMatch (null , []);
55
46
56
47
$ this ->assertEquals ('bar ' , $ match ->getParam ('foo ' , 'bar ' ));
57
48
}
0 commit comments