Extends
lithium\test\Unit
Tests that parameters from the `Request` object passed into `render()` via
`$options['request']` are properly merged into the `$options` array passed to render
handlers.
Returns
voidSource
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);
}