|
|
|
<?php
|
|
|
|
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
* Test Authentication Tokens.
|
|
|
|
*/
|
|
|
|
|
|
|
|
class IslandoraAuthtokensTestCase extends IslandoraWebTestCase {
|
|
|
|
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
/**
|
|
|
|
* Get test information for display.
|
|
|
|
*/
|
|
|
|
public static function getInfo() {
|
|
|
|
return array(
|
|
|
|
'name' => 'Islandora Authorization Tokens',
|
|
|
|
'description' => 'Ensure the correct functionality of the tokens to pass authorization to Djatoka in Islandora.',
|
|
|
|
'group' => 'Islandora',
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
/**
|
|
|
|
* Set up data for the tests.
|
|
|
|
*/
|
|
|
|
public function setUp() {
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
parent::setUp();
|
|
|
|
}
|
|
|
|
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
/**
|
|
|
|
* Test redeeming invalid tokens.
|
|
|
|
*/
|
|
|
|
public function testRedeemInvalidToken() {
|
|
|
|
module_load_include('inc', 'islandora', 'includes/authtokens');
|
|
|
|
$token = islandora_get_object_token('test:pid', 'woot', 1);
|
|
|
|
$this->assertTrue($token, 'Token was generated correctly.', 'Unit Tests');
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
// Redeem a token that doesn't exist with real pid and dsid.
|
|
|
|
$account = islandora_validate_object_token('test:pid', 'woot', 'foo');
|
|
|
|
$this->assertFalse($account, 'Redeeming an token that doesn\'t exist returns FALSE', 'Unit Tests');
|
|
|
|
}
|
|
|
|
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
/**
|
|
|
|
* Test redeeming valid tokens.
|
|
|
|
*/
|
|
|
|
public function testRedeemValidToken() {
|
|
|
|
module_load_include('inc', 'islandora', 'includes/authtokens');
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
// Change the current user.
|
|
|
|
global $user;
|
|
|
|
$user_backup = $user;
|
|
|
|
$test_account = $this->drupalCreateUser();
|
|
|
|
$user = $test_account;
|
|
|
|
$token = islandora_get_object_token('test:pid', 'woot', 1);
|
|
|
|
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
// Logout again.
|
|
|
|
$user = $user_backup;
|
|
|
|
$token_account = islandora_validate_object_token('test:pid', 'woot', $token);
|
|
|
|
$this->assertEqual($token_account->uid, $test_account->uid, 'UID from token is correct', 'Unit Tests');
|
|
|
|
$this->assertEqual($token_account->pass, $test_account->pass, 'Pass from token is correct', 'Unit Tests');
|
|
|
|
$this->assertEqual($token_account->name, $test_account->name, 'Name from token is correct', 'Unit Tests');
|
|
|
|
}
|
|
|
|
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
/**
|
|
|
|
* Test tokened datastream view without XACML.
|
|
|
|
*/
|
|
|
|
public function testTokenedViewDatastreamWithoutXacml() {
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
// Ingest the fixture.
|
|
|
|
$fixture_path = drupal_get_path('module', 'islandora') . '/tests/fixtures/bug.jp2';
|
|
|
|
$tuque = islandora_get_tuque_connection();
|
|
|
|
$newpid = "{$this->randomName()}:{$this->randomName()}";
|
|
|
|
$fixture_object = $tuque->repository->constructObject($newpid);
|
|
|
|
$fixture_datastream = $fixture_object->constructDatastream('JP2');
|
|
|
|
$fixture_datastream->setContentFromFile($fixture_path, TRUE);
|
|
|
|
$fixture_object->ingestDatastream($fixture_datastream);
|
|
|
|
$tuque->repository->ingestObject($fixture_object);
|
|
|
|
|
|
|
|
$this->drupalGet("islandora/object/{$newpid}/datastream/JP2/view");
|
|
|
|
$this->assertResponse(403, 'Page not found as anonymous');
|
|
|
|
|
|
|
|
$account = $this->drupalCreateUser(array(FEDORA_VIEW_OBJECTS));
|
|
|
|
$this->drupalLogin($account);
|
|
|
|
|
|
|
|
$this->drupalGet("islandora/object/{$newpid}/datastream/JP2/view");
|
|
|
|
$this->assertResponse(200, 'Page loaded as the authorized user');
|
|
|
|
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
// Do some voodoo to get a token as the user we are connecting as
|
|
|
|
// to do this we need to change the user we are logged in as.
|
|
|
|
module_load_include('inc', 'islandora', 'includes/authtokens');
|
|
|
|
global $user;
|
|
|
|
$backup = $user;
|
|
|
|
$user = $account;
|
|
|
|
$token = islandora_get_object_token($newpid, 'JP2', 1);
|
|
|
|
$user = $backup;
|
|
|
|
|
|
|
|
$this->drupalLogout();
|
|
|
|
|
|
|
|
$this->drupalGet("islandora/object/{$newpid}/datastream/JP2/view", array('query' => array('token' => $token)));
|
|
|
|
$this->assertResponse(200, 'Page loaded with the token');
|
|
|
|
|
|
|
|
$this->drupalGet("islandora/object/{$newpid}/datastream/JP2/view", array('query' => array('token' => $token)));
|
|
|
|
$this->assertResponse(403, 'Token is unable to be reused');
|
|
|
|
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
// Delete fixture object.
|
|
|
|
$tuque->repository->purgeObject($newpid);
|
|
|
|
}
|
|
|
|
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
/**
|
|
|
|
* This will test something someday.
|
|
|
|
*/
|
|
|
|
public function testTokenedViewDatastreamWithXacml() {
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
// We need to add this test.
|
|
|
|
}
|
Created hooks and implemented them as part of the tuque wrapper classes.
hook_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_CMODEL_PID_islandora_object_alter(AbstractFedoraObject $object, array &$context)
hook_islandora_datastream_alter(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_CMODEL_PID_DSID_islandora_datastream_altezr(AbstractFedoraObject $object, AbstractFedoraDatastream $datastream, array &$context)
hook_islandora_object_ingested(FedoraObject $object)
hook_CMODEL_PID_islandora_object_ingested(FedoraObject $object)
hook_islandora_object_modified(FedoraObject $object)
hook_CMODEL_PID_islandora_object_modified(FedoraObject $object)
hook_islandora_object_purged($pid)
hook_CMODEL_PID_islandora_object_purged($pid)
hook_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_DSID_islandora_datastream_ingested(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_CMODEL_PID_islandora_datastream_modified(FedoraObject $object, FedoraDatastream $datastream)
hook_islandora_datastream_purged(FedoraObject $object, $dsid)
hook_CMODEL_PID_islandora_datastream_purged(FedoraObject $object, $dsid)
Also updated the testing scripts to support different configurations, as well
wrote tests for all the implemented hooks. This requires the latest version
of Tuque so be sure to update.
12 years ago
|
|
|
}
|