Easier way to create a mock request for tests
This commit is contained in:
parent
7b48dbfd94
commit
929123c08e
1 changed files with 7 additions and 7 deletions
|
@ -43,13 +43,13 @@ class UglyRouterTest extends \PHPUnit_Framework_TestCase
|
||||||
$this->assertEquals(
|
$this->assertEquals(
|
||||||
[1, 'route0', []],
|
[1, 'route0', []],
|
||||||
$this->router->dispatch(
|
$this->router->dispatch(
|
||||||
new Request(
|
Request::createFromEnvironment(
|
||||||
'GET',
|
Environment::mock(
|
||||||
Uri::createFromString('http://example.com/?page=foo'),
|
[
|
||||||
Headers::createFromEnvironment(new Environment()),
|
'REQUEST_METHOD' => 'GET',
|
||||||
[],
|
'QUERY_STRING'=>'page=foo'
|
||||||
[],
|
]
|
||||||
new Stream(fopen('php://temp', 'r'))
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue