$this->
assertSame('http://www.example.com/foo/foobar',
$client->
getRequest()->
getUri(), '->reload() reloads the current page'
);
$this->
assertArrayHasKey('foo',
$client->
getRequest()->
getParameters(), '->reload() keeps parameters'
);
$this->
assertArrayHasKey('myfile.foo',
$client->
getRequest()->
getFiles(), '->reload() keeps files'
);
$this->
assertArrayHasKey('X_TEST_FOO',
$client->
getRequest()->
getServer(), '->reload() keeps $_SERVER'
);
$this->
assertSame($content,
$client->
getRequest()->
getContent(), '->reload() keeps content'
);
} public function testRestart() { $client =
$this->
getBrowser();
$client->
request('GET', 'http://www.example.com/foo/foobar'
);
$client->
restart();
$this->
assertTrue($client->
getHistory()->
isEmpty(), '->restart() clears the history'
);
$this->
assertSame([],
$client->
getCookieJar()->
all(), '->restart() clears the cookies'
);
} /**
* @runInSeparateProcess
*/
public function testInsulatedRequests() { $client =
$this->
getBrowser();