Browse Source

Fix some coding standards.

pull/330/head
jonathangreen 12 years ago
parent
commit
aac7a738f9
  1. 16
      tests/islandora_web_test_case.inc

16
tests/islandora_web_test_case.inc

@ -130,7 +130,7 @@ class IslandoraWebTestCase extends DrupalWebTestCase {
/** /**
* Asserts that the given datastreams exist on the object. * Asserts that the given datastreams exist on the object.
* *
* @param AbstractObject $objectpid * @param AbstractObject $object
* The PID of the object * The PID of the object
* @param array $datastreams * @param array $datastreams
* An array of strings containing datastream names * An array of strings containing datastream names
@ -141,7 +141,7 @@ class IslandoraWebTestCase extends DrupalWebTestCase {
return; return;
} }
foreach($datastreams as $datastream) { foreach ($datastreams as $datastream) {
if (isset($object[$datastream])) { if (isset($object[$datastream])) {
$this->pass("Loaded datastream {$datastream} from PID {$object->id}"); $this->pass("Loaded datastream {$datastream} from PID {$object->id}");
} }
@ -164,9 +164,9 @@ class IslandoraWebTestCase extends DrupalWebTestCase {
$path_parts = explode('/', $path); $path_parts = explode('/', $path);
$array_length = count($path_parts); $array_length = count($path_parts);
for ($i = 0; $i < $array_length; $i++) { for ($i = 0; $i < $array_length; $i++) {
if ($path_parts[$i] == 'islandora' && isset($path_parts[$i+1]) && $path_parts[$i+1] == 'object') { if ($path_parts[$i] == 'islandora' && isset($path_parts[$i + 1]) && $path_parts[$i + 1] == 'object') {
if (isset($path_parts[$i+2])) { if (isset($path_parts[$i + 2])) {
return islandora_object_load(urldecode($path_parts[$i+2])); return islandora_object_load(urldecode($path_parts[$i + 2]));
} }
} }
} }
@ -182,7 +182,11 @@ class IslandoraWebTestCase extends DrupalWebTestCase {
*/ */
public function deleteObject($pid) { public function deleteObject($pid) {
$current_user = $this->loggedInUser; $current_user = $this->loggedInUser;
$user = $this->drupalCreateUser(array('manage object properties', 'delete fedora objects and datastreams', 'view fedora repository objects')); $user = $this->drupalCreateUser(array(
'manage object properties',
'delete fedora objects and datastreams',
'view fedora repository objects',
));
$this->drupalLogin($user); $this->drupalLogin($user);

Loading…
Cancel
Save