@ -101,11 +101,10 @@ class IslandoraWebTestCase extends DrupalWebTestCase {
}
}
/**
/**
* Creates a temporary Drupal user with administrative privileges. This is much simpler than the probably-unnecessary process of determining the correct permissions for most tests.
* Creates a temporary Drupal user with administrative privileges.
*
* @param $permissions
* An array of permissions which the temporary admin user will adopt; should be left blank, as this will just pull all the permissions currently assigned to the Administrator role.
*
*
* @param array $permissions
* An optional set of different permissions to use (leave blank for all).
*/
*/
public function createDrupalAdminUser(array $permissions = array()) {
public function createDrupalAdminUser(array $permissions = array()) {
$roles = user_roles();
$roles = user_roles();
@ -115,62 +114,6 @@ class IslandoraWebTestCase extends DrupalWebTestCase {
return user_save($user);
return user_save($user);
}
}
/**
* Creates a randomly generated child collection in the top-level collection through the testing interface. This should be used in lieu of throwing test objects into a standard collection, in case that collection has been deleted.
*
* @param $label
* The label that should be assigned to the collection
* @param $model
* The content model the collection should use
* @param $pid
* The PID that should be assigned to the collection (left blank by default, using a sequentially assigned number)
* Stores the content of the Drupal Filter for later restoration.
* Stores the content of the Drupal Filter for later restoration.
*/
*/
@ -186,41 +129,20 @@ class IslandoraWebTestCase extends DrupalWebTestCase {
}
}
/**
/**
* Searches through the pages inside the root collection and opens the one specified by its label. This is much slower than doing it directly by PID; use this in tests where the PID is unknown.
* Gets the list of object PIDs owned by a user from the test database.
* @param $label
*
* The label of the collection
* @param string $user
* The user whose PIDs we want to grab
*
*
* @return array $objectpids
* Array storing PIDs found
*/
*/
public function openRootTestCollectionByLabel($label, $index = 0) {