CodeExplorer getResponseCookies example
$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());
$this->
assertContainsEquals(__FILE__,
$attributes->
get('resource'
));
$this->
assertSame('stdClass',
$attributes->
get('object'
)->
getType());
$this->
assertInstanceOf(ParameterBag::
class,
$c->
getResponseHeaders());
$this->
assertSame('OK',
$c->
getStatusText());
$this->
assertSame(200,
$c->
getStatusCode());