public testRequestOptionMerging ( ) |
public function testRequestOptionMerging()
{
Media::type('custom', 'text/x-custom');
$request = new Request();
$request->params['foo'] = 'bar';
$response = new Response();
$response->type('custom');
Media::render($response, null, compact('request') + array('layout' => false, 'template' => false, 'encode' => function ($data, $handler) {
return $handler['request']->foo;
}));
$this->assertEqual(array('bar'), $response->body);
}