-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
835 additions
and
348 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,159 @@ | ||
<?php | ||
|
||
namespace Profiles; | ||
|
||
use whikloj\BagItTools\Profiles\BagItProfile; | ||
use whikloj\BagItTools\Test\BagItTestFramework; | ||
use whikloj\BagItTools\Test\Profiles\ProfileTestFramework; | ||
|
||
/** | ||
* Test BagItProfile against the specifications foo | ||
* @package Profiles | ||
* @coversDefaultClass \whikloj\BagItTools\Profiles\BagItProfile | ||
*/ | ||
class BagItProfileBarTest extends ProfileTestFramework | ||
{ | ||
protected function getProfileFilename(): string | ||
{ | ||
return self::TEST_RESOURCES . '/profiles/bagProfileBar.json'; | ||
} | ||
|
||
protected function getProfileUri(): string | ||
{ | ||
return self::$remote_urls[1]; | ||
} | ||
|
||
protected function getProfileValues(): array | ||
{ | ||
return [ | ||
'identifier' => 'http://canadiana.org/standards/bagit/tdr_ingest.json', | ||
'spec_version' => '1.2.0', | ||
'version' => '1.2', | ||
'source_organization' => 'Candiana.org', | ||
'external_description' => 'BagIt Profile for ingesting content into the C.O. TDR loading dock.', | ||
'contact_name' => 'William Wueppelmann', | ||
'contact_email' => 'tdr@canadiana.com', | ||
'contact_phone' => null, | ||
'bag_info_tags' => [ | ||
"Source-Organization" => [ | ||
"required" => true, | ||
"values" => [ | ||
"Simon Fraser University", | ||
"York University" | ||
], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
"Organization-Address" => [ | ||
"required" => true, | ||
"values" => [ | ||
"8888 University Drive Burnaby, B.C. V5A 1S6 Canada", | ||
"4700 Keele Street Toronto, Ontario M3J 1P3 Canada" | ||
], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
"Contact-Name" => [ | ||
"required" => true, | ||
"values" => [ | ||
"Mark Jordan", | ||
"Nick Ruest" | ||
], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
"Contact-Phone" => [ | ||
"required" => false, | ||
'values' => [], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
"Contact-Email" => [ | ||
"required" => true, | ||
'values' => [], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
"External-Description" => [ | ||
"required" => true, | ||
'values' => [], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
"External-Identifier" => [ | ||
"required" => false, | ||
'values' => [], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
"Bag-Size" => [ | ||
"required" => true, | ||
'values' => [], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
"Bag-Group-Identifier" => [ | ||
"required" => false, | ||
'values' => [], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
"Bag-Count" => [ | ||
"required" => true, | ||
'values' => [], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
"Internal-Sender-Identifier" => [ | ||
"required" => false, | ||
'values' => [], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
"Internal-Sender-Description" => [ | ||
"required" => false, | ||
'values' => [], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
"Bagging-Date" => [ | ||
"required" => true, | ||
'values' => [], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
"Payload-Oxum" => [ | ||
"required" => true, | ||
'values' => [], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
], | ||
'manifests_required' => [ | ||
"md5", | ||
], | ||
'manifests_allowed' => [], | ||
'allow_fetch_txt' => false, | ||
'require_fetch_txt' => false, | ||
'data_empty' => false, | ||
'serialization' => 'optional', | ||
'accept_serialization' => [ | ||
"application/zip", | ||
], | ||
'accept_bagit_version' => [ | ||
"0.96", | ||
], | ||
'tag_manifests_required' => [ | ||
"md5" | ||
], | ||
'tag_manifests_allowed' => [], | ||
'tag_files_required' => [ | ||
"DPN/dpnFirstNode.txt", | ||
"DPN/dpnRegistry", | ||
], | ||
'tag_files_allowed' => [], | ||
'payload_files_required' => [], | ||
'payload_files_allowed' => [], | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?php | ||
|
||
namespace Profiles; | ||
|
||
use whikloj\BagItTools\Test\Profiles\ProfileTestFramework; | ||
|
||
/** | ||
* Test BagItProfile against the specifications foo | ||
* @package Profiles | ||
* @coversDefaultClass \whikloj\BagItTools\Profiles\BagItProfile | ||
*/ | ||
class BagItProfileFooTest extends ProfileTestFramework | ||
{ | ||
protected function getProfileFilename(): string | ||
{ | ||
return self::TEST_RESOURCES . '/profiles/bagProfileFoo.json'; | ||
} | ||
|
||
protected function getProfileUri(): string | ||
{ | ||
return self::$remote_urls[0]; | ||
} | ||
|
||
protected function getProfileValues(): array | ||
{ | ||
return [ | ||
'identifier' => 'http://www.library.yale.edu/mssa/bagitprofiles/disk_images.json', | ||
'spec_version' => '1.1.0', | ||
'version' => '0.3', | ||
'source_organization' => 'Yale University', | ||
'external_description' => 'BagIt Profile for packaging disk images', | ||
'contact_name' => 'Mark Matienzo', | ||
'contact_email' => null, | ||
'contact_phone' => null, | ||
'bag_info_tags' => [ | ||
'Bagging-Date' => [ | ||
'required' => true, | ||
'values' => [], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
'Source-Organization' => [ | ||
'required' => true, | ||
'values' => [ | ||
'Simon Fraser University', | ||
'York University', | ||
], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
"Contact-Phone" => [ | ||
"required" => true, | ||
"values" => [], | ||
'repeatable' => true, | ||
'description' => '', | ||
], | ||
], | ||
'manifests_required' => [ | ||
"md5", | ||
], | ||
'manifests_allowed' => [], | ||
'allow_fetch_txt' => false, | ||
'require_fetch_txt' => false, | ||
'data_empty' => false, | ||
'serialization' => 'required', | ||
'accept_serialization' => [ | ||
"application/tar", | ||
"application/zip", | ||
], | ||
'accept_bagit_version' => [ | ||
"0.96", | ||
"0.97", | ||
], | ||
'tag_manifests_required' => [], | ||
'tag_manifests_allowed' => [], | ||
'tag_files_required' => [], | ||
'tag_files_allowed' => [], | ||
'payload_files_required' => [], | ||
'payload_files_allowed' => [], | ||
]; | ||
} | ||
} |
Oops, something went wrong.