Fixed StoredFile constructor to only load metadata when passing in an ID.
Added a test for StoredFile::loadMetadata().
This commit is contained in:
parent
eafd10a669
commit
fc8c964d52
2 changed files with 20 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue