CodeExplorer getRequestHeaders example
public function testCollect() { $c =
new RequestDataCollector();
$c->
collect($request =
$this->
createRequest(),
$this->
createResponse());
$c->
lateCollect();
$attributes =
$c->
getRequestAttributes();
$this->
assertSame('request',
$c->
getName());
$this->
assertInstanceOf(ParameterBag::
class,
$c->
getRequestHeaders());
$this->
assertInstanceOf(ParameterBag::
class,
$c->
getRequestServer());
$this->
assertInstanceOf(ParameterBag::
class,
$c->
getRequestCookies());
$this->
assertInstanceOf(ParameterBag::
class,
$attributes);
$this->
assertInstanceOf(ParameterBag::
class,
$c->
getRequestRequest());
$this->
assertInstanceOf(ParameterBag::
class,
$c->
getRequestQuery());
$this->
assertInstanceOf(ParameterBag::
class,
$c->
getResponseCookies());
$this->
assertSame('html',
$c->
getFormat());
$this->
assertEquals('foobar',
$c->
getRoute());
$this->
assertEquals(['name' => 'foo'
],
$c->
getRouteParams());
$this->
assertSame([],
$c->
getSessionAttributes());
$this->
assertSame('en',
$c->
getLocale());