public function testLocation()
{
$webroot = Libraries::get(true, 'resources') . '/tmp/tests/webroot';
mkdir($webroot, 0777, true);
$webroot = realpath($webroot);
$this->assertNotEmpty($webroot);
Media::attach('tests', array('absolute' => true, 'host' => 'www.hostname.com', 'scheme' => 'http://', 'prefix' => '/web/assets/tests', 'path' => $webroot));
Media::attach('app', array('absolute' => false, 'prefix' => '/web/assets/app', 'path' => $webroot));
$expected = array('absolute' => false, 'host' => 'localhost', 'scheme' => 'http://', 'base' => null, 'prefix' => 'web/assets/app', 'path' => $webroot, 'timestamp' => false, 'filter' => null, 'suffix' => null, 'check' => false);
$result = Media::attached('app');
$this->assertEqual($expected, $result);
$expected = array('absolute' => true, 'host' => 'www.hostname.com', 'scheme' => 'http://', 'base' => null, 'prefix' => 'web/assets/tests', 'path' => $webroot, 'timestamp' => false, 'filter' => null, 'suffix' => null, 'check' => false);
$result = Media::attached('tests');
$this->assertEqual($expected, $result);
$this->_cleanUp();
}