lithium\tests\cases\net\http\MediaTest::testUnregisteredContentHandler PHP Method

testUnregisteredContentHandler() public method

Tests that attempts to render a media type with no handler registered produces an 'unhandled media type' exception, even if the type itself is a registered content type.
    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);
    }