public function testUndhandledContent() { $response = new Response(); $response->type('bad'); $this->assertException("Unhandled media type `bad`.", function () use($response) { Media::render($response, array('foo' => 'bar')); }); $result = $response->body(); $this->assertIdentical('', $result); }