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(
|
||||
[1, 'route0', []],
|
||||
$this->router->dispatch(
|
||||
new Request(
|
||||
'GET',
|
||||
Uri::createFromString('http://example.com/?page=foo'),
|
||||
Headers::createFromEnvironment(new Environment()),
|
||||
[],
|
||||
[],
|
||||
new Stream(fopen('php://temp', 'r'))
|
||||
Request::createFromEnvironment(
|
||||
Environment::mock(
|
||||
[
|
||||
'REQUEST_METHOD' => 'GET',
|
||||
'QUERY_STRING'=>'page=foo'
|
||||
]
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue