From 2bf3bf71d6267318babf129be58e593f3c4ecd0d Mon Sep 17 00:00:00 2001 From: qadan Date: Wed, 22 Jan 2014 16:07:47 +0000 Subject: [PATCH] a bit of cleanup --- tests/islandora_web_test_case.inc | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/tests/islandora_web_test_case.inc b/tests/islandora_web_test_case.inc index 78b54926..4f7b302a 100644 --- a/tests/islandora_web_test_case.inc +++ b/tests/islandora_web_test_case.inc @@ -190,19 +190,14 @@ class IslandoraWebTestCase extends DrupalWebTestCase { $this->fail("Failed. Object passed in is invalid.", 'Islandora'); } else { - $object_datastreams = array_keys($this->admin->repository->api->a->listDatastreams($object->id)); - $missing_datastreams = implode(', ', array_diff_key($datastreams, $object_datastreams)); - $present_datastreams = implode(', ', array_intersect_key($datastreams, $object_datastreams)); + $missing_datastreams = implode(', ', array_diff_key($datastreams, array_keys($this->admin->repository->api->a->listDatastreams($object->id)))); if ($missing_datastreams !== '') { - $this->fail("Failed to load datastreams {$missing_datastreams} from object {$object->id}."); - if ($present_datastreams !== '') { - $this->pass("Loaded datastreams {$present_datastreams} from object {$object->id}"); - } + $this->fail("Failed to find datastreams {$missing_datastreams} in object {$object->id}."); return FALSE; } - $this->pass("Loaded datastreams {$present_datastreams} from object {$object->id}"); + $this->pass("Found all required datastreams in object {$object->id}"); return TRUE; } }