@ -216,6 +218,8 @@ class IslandoraDerivativesTestCase extends IslandoraWebTestCase {
'OBJ',
'OBJ',
'DERIV',
'DERIV',
'NOSOURCE',
'NOSOURCE',
'SOMEWEIRDDATASTREAM',
'STANLEY',
));
));
$this->assertEqual(3, count($_islandora_derivative_test_derivative_functions), 'Expected 3 derivative functions when there is no source_dsid, got ' . count($_islandora_derivative_test_derivative_functions) . '.');
$this->assertEqual(3, count($_islandora_derivative_test_derivative_functions), 'Expected 3 derivative functions when there is no source_dsid, got ' . count($_islandora_derivative_test_derivative_functions) . '.');
}
}
@ -226,7 +230,8 @@ class IslandoraDerivativesTestCase extends IslandoraWebTestCase {
public function testNoSourceDSIDForce() {
public function testNoSourceDSIDForce() {
global $_islandora_derivative_test_derivative_functions;
global $_islandora_derivative_test_derivative_functions;
@ -236,6 +241,8 @@ class IslandoraDerivativesTestCase extends IslandoraWebTestCase {
'RELS-EXT',
'RELS-EXT',
'OBJ',
'OBJ',
'DERIV',
'DERIV',
'SOMEWEIRDDATASTREAM',
'STANLEY',
'NOSOURCE',
'NOSOURCE',
));
));
$this->assertEqual(3, count($_islandora_derivative_test_derivative_functions), 'Expected 3 derivative functions when there is no source_dsid, got ' . count($_islandora_derivative_test_derivative_functions) . '.');
$this->assertEqual(3, count($_islandora_derivative_test_derivative_functions), 'Expected 3 derivative functions when there is no source_dsid, got ' . count($_islandora_derivative_test_derivative_functions) . '.');
@ -293,4 +300,22 @@ class IslandoraDerivativesTestCase extends IslandoraWebTestCase {
$object->ingestDatastream($ds);
$object->ingestDatastream($ds);
return $object;
return $object;
}
}
/**
* Helper function to construct the SWD datastream without firing hooks.
*
* @param AbstractObject $object
* An AbstractObject representing a FedoraObject.
*
* @return AbstractObject
* The modified AbstractObject.
*/
public function constructSOMEWEIRDDATASTREAMDatastream(AbstractObject $object) {