Fixed StoredFile constructor to only load metadata when passing in an ID.

Added a test for StoredFile::loadMetadata().
This commit is contained in:
paul.baranowski 2010-11-15 15:58:48 -05:00
parent eafd10a669
commit fc8c964d52
2 changed files with 20 additions and 3 deletions

View file

@ -62,8 +62,16 @@ class StoredFileTest extends PHPUnit_TestCase {
$this->fail("StoredFile not created correctly. id = ".$id);
return;
}
}
$f = new StoredFile();
$f->__setGunid($storedFile->getGunid());
$f->loadMetadata();
if (!is_array($md = $f->getMetadata())) {
$this->fail("Unable to load metadata.");
return;
}
//var_dump($md);
}
}
?>