From 4ec2185d2d7a41d553b8b3e13742e95cba81e8c4 Mon Sep 17 00:00:00 2001 From: qadan Date: Tue, 21 Jan 2014 15:33:45 +0000 Subject: [PATCH] let's add in one last failsafe --- tests/islandora_web_test_case.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/islandora_web_test_case.inc b/tests/islandora_web_test_case.inc index 5c198e16..45d887ee 100644 --- a/tests/islandora_web_test_case.inc +++ b/tests/islandora_web_test_case.inc @@ -434,6 +434,11 @@ class IslandoraWebTestCase extends DrupalWebTestCase { * TRUE on success, FALSE on failure. */ public function deleteUserCreatedObjects($username) { + if ($username === $this->configuration['admin_user']) { + $this->fail("This function will under no circumstance attempt deletion of all objects owned by the configured Fedora admin user ({$this->configuration['admin_user']}), as this would irreparably damage the repository.", 'Islandora'); + return FALSE; + } + $query = << WHERE {