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