Browse Source

better error handling

pull/507/head
qadan 11 years ago
parent
commit
83960d6f02
  1. 5
      tests/includes/datastream_validators.inc

5
tests/includes/datastream_validators.inc

@ -128,6 +128,7 @@ abstract class DatastreamValidator extends IslandoraTestUtilityClass {
* fails to $this->passes and/or $this->fails.
*/
public function runValidators() {
if ($this->object[$this->datastream]) {
$methods = get_class_methods($this);
foreach ($methods as $method) {
if (substr($method, 0, 6) === 'assert') {
@ -135,6 +136,10 @@ abstract class DatastreamValidator extends IslandoraTestUtilityClass {
}
}
}
else {
$this->addResult(FALSE, "Unable to load the requested datastream {$this->datastream} from object {$this->object->id}.");
}
}
/**
* Returns an array of IslandoraTestUtilityResults.

Loading…
Cancel
Save