Browse Source

fix for deleting objects with different button labels

The Book Solution Pack's 'delete' button says 'Delete Book' rather than just 'Delete'; this allows the Book Solution Pack to use its own special label, as well as any other solution packs that might use different labels in the future.
pull/344/head
daitken 12 years ago
parent
commit
fca2775194
  1. 6
      tests/islandora_web_test_case.inc

6
tests/islandora_web_test_case.inc

@ -179,11 +179,13 @@ class IslandoraWebTestCase extends DrupalWebTestCase {
*
* @param string $pid
* The PID of the collection to be deleted
* @param string $button
* The label of the first 'Delete' button
*/
public function deleteObject($pid) {
public function deleteObject($pid, $button='Delete') {
$path = 'islandora/object/' . $pid . '/manage/properties';
$edit = array();
$this->drupalPost($path, $edit, t('Delete'));
$this->drupalPost($path, $edit, $button);
$this->drupalPost($this->url, $edit, t('Delete'));
$object = islandora_object_load($pid);

Loading…
Cancel
Save