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

testUndhandledContent() public method

Tests that an exception is thrown for cases where an attempt is made to render content for a type which is not registered.
    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);
    }