Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit f1ed732

Browse files
committed
Fix failing RouteMatch test
1 parent b8b4ff1 commit f1ed732

File tree

2 files changed

+5
-80
lines changed

2 files changed

+5
-80
lines changed

test/Route/RouteMatchTest.php

-66
This file was deleted.

test/RouteMatchTest.php

+5-14
Original file line numberDiff line numberDiff line change
@@ -14,44 +14,35 @@ class RouteMatchTest extends TestCase
1414
{
1515
public function testParamsAreStored()
1616
{
17-
$match = new RouteMatch(['foo' => 'bar']);
17+
$match = new RouteMatch(null, ['foo' => 'bar']);
1818

1919
$this->assertEquals(['foo' => 'bar'], $match->getParams());
2020
}
2121

2222
public function testMatchedRouteNameIsSet()
2323
{
24-
$match = new RouteMatch([]);
25-
$match->setMatchedRouteName('foo');
24+
$match = new RouteMatch('foo', []);
2625

2726
$this->assertEquals('foo', $match->getMatchedRouteName());
2827
}
2928

30-
public function testSetParam()
31-
{
32-
$match = new RouteMatch([]);
33-
$match->setParam('foo', 'bar');
34-
35-
$this->assertEquals(['foo' => 'bar'], $match->getParams());
36-
}
37-
3829
public function testGetParam()
3930
{
40-
$match = new RouteMatch(['foo' => 'bar']);
31+
$match = new RouteMatch(null, ['foo' => 'bar']);
4132

4233
$this->assertEquals('bar', $match->getParam('foo'));
4334
}
4435

4536
public function testGetNonExistentParamWithoutDefault()
4637
{
47-
$match = new RouteMatch([]);
38+
$match = new RouteMatch(null, []);
4839

4940
$this->assertNull($match->getParam('foo'));
5041
}
5142

5243
public function testGetNonExistentParamWithDefault()
5344
{
54-
$match = new RouteMatch([]);
45+
$match = new RouteMatch(null, []);
5546

5647
$this->assertEquals('bar', $match->getParam('foo', 'bar'));
5748
}

0 commit comments

Comments
 (0)