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

testEnvironmentAsset2() public method

Create environment prefix location using lihtium\net\http\Media::location Check if lihtium\net\http\Media::asset return the correct URL for the test environement
    public function testEnvironmentAsset2()
    {
        Media::attach('appcdn', array('production' => array('absolute' => true, 'path' => null, 'scheme' => 'http://', 'host' => 'my.cdnapp.com', 'prefix' => 'assets'), 'test' => array('absolute' => true, 'path' => null, 'scheme' => 'http://', 'host' => 'my.cdntest.com', 'prefix' => 'assets')));
        $env = Environment::get();
        Environment::set('test');
        $result = Media::asset('style', 'css', array('scope' => 'appcdn'));
        $expected = 'http://my.cdntest.com/assets/css/style.css';
        $this->assertEqual($expected, $result);
        Environment::is($env);
    }