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

testTypeAliasResolution() public method

Tests that calling Media::type() to retrieve the details of a type that is aliased to another type, automatically resolves to the settings of the type being pointed at.
    public function testTypeAliasResolution()
    {
        $resolved = Media::type('text');
        $this->assertEqual(array('text/plain'), $resolved['content']);
        unset($resolved['options']['encode']);
        $result = Media::type('txt');
        unset($result['options']['encode']);
        $this->assertEqual($resolved, $result);
    }