/** * Load a created asset file. */ function testLoadAssetFile() { $this->testAssetWithRendition90x90(); $created = time(); $basepath = 'test/somehashhere/'; $basepathAbs = binarypool_config::getRoot() . $basepath; $assetFile = $basepath . 'index.xml'; $asset = new binarypool_asset($this->getDummyStorage(), $assetFile); $this->assertEqual('test/somehashhere/', $asset->getBasePath()); $this->assertEqual($basepathAbs . 'vw_golf.jpg', $asset->getOriginal()); $this->assertEqual($basepathAbs . 'resultlist.jpg', $asset->getRendition('resultlist')); $this->assertEqual(array('resultlist' => $basepathAbs . 'resultlist.jpg'), $asset->getRenditions()); $this->assertEqual('096dfa489bc3f21df56eded2143843f135ae967e', $asset->getHash()); $this->assertWithinMargin($created, $asset->getCreated(), 10); $this->assertEqual('IMAGE', $asset->getType()); }