Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
FunctionalUrnPubIdPluginTest Class Reference
Inheritance diagram for FunctionalUrnPubIdPluginTest:
WebTestCase

Public Member Functions

 testCustomPublicURL ()
 
 testCustomSuffix ()
 
 testCustomSuffixPattern ()
 
 testDefaultSuffixPattern ()
 
 testRequiredCustomSuffixPatterns ()
 
 testRequiredFields ()
 
 testSettingChanges ()
 
 testValidPrefix ()
 

Protected Member Functions

 getAffectedTables ()
 
 onNotSuccessfulTest ($e)
 
 setUp ()
 
 tearDown ()
 
- Protected Member Functions inherited from WebTestCase
 getAffectedTables ()
 
 improveException ($e, $testObject)
 
 logIn ()
 
 setUp ()
 
 tearDown ()
 
 verified ()
 
 verifyAndOpen ($url)
 

Detailed Description

Test URN plug-in.

FEATURE: URN support – settings AS A journal manager I WANT to be able to define rules how URNs should be used (assigned, generated, displayed) SO THAT they can be correctly and uniquely used and identified.

AS AN editor I WANT to be able to use URNs according to the rules: to assign them to the publishing items, to generate them (if not autoamtically) and to see them in the metadata SO THAT I am able to easily manage them.

AS A reader I WANT to be able to see URNs SO THAT I can persistently use them.

FIXME-BB: I think there is quite a bit of duplicate code between this class and the FunctionalDOIPubIdPluginTest which can be resolved by creating a common subclass for both or moving common code to a helper class.

Definition at line 40 of file FunctionalUrnPubIdPluginTestCase.php.

Member Function Documentation

FunctionalUrnPubIdPluginTest::getAffectedTables ( )
protected
FunctionalUrnPubIdPluginTest::onNotSuccessfulTest (   $e)
protected
See Also
PHPUnit_Extensions_SeleniumTestCase::onNotSuccessfulTest()

Definition at line 585 of file FunctionalUrnPubIdPluginTestCase.php.

FunctionalUrnPubIdPluginTest::setUp ( )
protected
See Also
WebTestCase::setUp()

Definition at line 61 of file FunctionalUrnPubIdPluginTestCase.php.

References WebTestCase\logIn().

FunctionalUrnPubIdPluginTest::tearDown ( )
protected
See Also
PHPUnit_Framework_TestCase::tearDown()

Definition at line 159 of file FunctionalUrnPubIdPluginTestCase.php.

FunctionalUrnPubIdPluginTest::testCustomPublicURL ( )

SCENARIO OUTLINE: Custom public URL ID as the URN suffix GIVEN I specified {custom public id} WHEN I am on {editor/view and reader/generation page} THEN I see {URN} displayed on that page

EXAMPLES:

| object type | custom public id | editor/view and reader/generation page | URN |

| issue | issueurl1 | .../editor/issueData/1 | urn:nbn:de:0000-issueurl17 | | issue | issueurl1 | .../issue/view/1 | urn:nbn:de:0000-issueurl17 | | issue | | .../editor/issueData/1 | urn:nbn:de:0000-i16 | | issue | | .../issue/view/1 | urn:nbn:de:0000-i16 | | article | articleurl1 | .../editor/viewMetadata/1 | urn:nbn:de:0000-articleurl12 | | article | articleurl1 | .../article/view/1 + DC <meta>, Google <meta> | urn:nbn:de:0000-articleurl12 | | article | | .../editor/viewMetadata/1 | urn:nbn:de:0000-15 | | article | | .../article/view/1 + DC <meta>, Google <meta> | urn:nbn:de:0000-15 | | galley | galleyurl1 | .../editor/editGalley/1/1 | urn:nbn:de:0000-galleyurl14 | | galley | galleyurl1 | .../article/view/1/1 + DC <meta>, Google <meta> | urn:nbn:de:0000-galleyurl14 | | galley | | .../editor/editGalley/1/1 | urn:nbn:de:0000-g16 | | galley | | .../article/view/1/1 + DC <meta>, Google <meta> | urn:nbn:de:0000-g16 | | supp file | suppfileurl1 | .../editor/editSuppFile/1/1?from=submissionEditing | urn:nbn:de:0000-suppfileurl16 | | supp file | suppfileurl1 | .../rt/suppFileMetadata/1/0/1 | urn:nbn:de:0000-suppfileurl16 | | supp file | | .../editor/editSuppFile/1/1?from=submissionEditing | urn:nbn:de:0000-s10 | | supp file | | .../rt/suppFileMetadata/1/0/1 | urn:nbn:de:0000-s10 |

Definition at line 388 of file FunctionalUrnPubIdPluginTestCase.php.

FunctionalUrnPubIdPluginTest::testCustomSuffix ( )

SCENARIO OUTLINE: Check number is missing GIVEN I have chosen custom suffix AND URN for an item hasn't been generated yet WHEN I am on {editor/view page} for that object AND I specify the {custom suffix} AND I click on the "Save" button THEN I see the error message "Check number is missing."

EXAMPLES:

| object type | custom suffix | editor/view page |

| issue | issue1 | .../editor/issueData/1 | | article | article1 | .../editor/viewMetadata/1 | | galley | galley1 | .../editor/editGalley/1/1 | | supp file | suppfile1 | .../editor/editSuppFile/1/1?from=submissionEditing |

SCENARIO OUTLINE: Define a custom suffix GIVEN I have chosen custom suffix AND URN for an item hasn't been generated yet WHEN I am on {editor/view page} for that object AND I specify the {custom suffix} AND I click on the button "Calculate Check Number" THEN I see the calculated check number automaticaly added to that custom suffix and {new custom suffix} displayed

EXAMPLES:

| object type | custom suffix | editor/view page | new custom suffix |

| issue | issue1 | .../editor/issueData/1 | issue14 | | article | article1 | .../editor/viewMetadata/1 | article13 | | galley | galley1 | .../editor/editGalley/1/1 | galley18 | | supp file | suppfile1 | .../editor/editSuppFile/1/1?from=submissionEditing | suppfile14 |

SCENARIO OUTLINE: Custom suffix GIVEN I specified {custom suffix} AND the URN for that object was generated WHEN I am on {editor/view and reader/generation page} THEN I see {URN} displayed on that page

EXAMPLES:

| object type | custom suffix | editor/view and reader/generation page | URN |

| issue | issue14 | .../editor/issueData/1 | urn:nbn:de:0000-issue14 | | issue | issue14 | .../issue/view/1 | urn:nbn:de:0000-issue14 | | article | article13 | .../editor/viewMetadata/1 | urn:nbn:de:0000-article13 | | article | article13 | .../article/view/1 + DC <meta>, Google <meta> | urn:nbn:de:0000-article13 | | galley | galley18 | .../editor/editGalley/1/1 | urn:nbn:de:0000-galley18 | | galley | galley18 | .../article/view/1 + DC <meta>, Google <meta> | urn:nbn:de:0000-galley18 | | supp file | suppfile14 | .../editor/editSuppFile/1/1?from=submissionEditing | urn:nbn:de:0000-suppfile14 | | supp file | suppfile14 | .../rt/suppFileMetadata/1/0/1 | urn:nbn:de:0000-suppfile14 |

SCENARIO OUTLINE: Duplicated custom suffix GIVEN the {URN} was generated for a galley object WHEN I am on {editor/view and reader/generation page} of another object AND I specify the {custom suffix} AND I click on the "Save" button THEN I see the error message "The given URN suffix is already in use for another published item. Please enter a unique URN suffix for each item."

EXAMPLES:

| URN | custom suffix | editor/view page |

| urn:nbn:de:0000-galley18 | galley18 | .../editor/viewMetadata/2 |

Definition at line 490 of file FunctionalUrnPubIdPluginTestCase.php.

FunctionalUrnPubIdPluginTest::testCustomSuffixPattern ( )

SCENARIO OUTLINE: Custom suffix pattern GIVEN I specified {custom pattern} WHEN I am on {editor/view and reader/generation page} THEN I see {URN} displayed on that page

EXAMPLES:

| object type | custom pattern | editor/view and reader/generation page | URN |

| issue | test.j.vvii | .../editor/issueData/1 | urn:nbn:de:0000-test.t.v1i16 | | issue | test.j.vvii | .../issue/view/1 | urn:nbn:de:0000-test.t.v1i16 | | article | test.j.vvii.a | .../editor/viewMetadata/1 | urn:nbn:de:0000-test.t.v1i1.10 | | article | test.j.vvii.a | .../article/view/1 + DC <meta>, Google <meta> | urn:nbn:de:0000-test.t.v1i1.10 | | galley | test.j.vvii.a.gg | .../editor/editGalley/1/1 | urn:nbn:de:0000-test.t.v1i1.1.g14 | | galley | test.j.vvii.a.gg | .../article/view/1/1 + DC <meta>, Google <meta> | urn:nbn:de:0000-test.t.v1i1.1.g14 | | supp file | test.j.vvii.a.ss | .../editor/editSuppFile/1/1?from=submissionEditing | urn:nbn:de:0000-test.t.v1i1.1.s11 | | supp file | test.j.vvii.a.ss | .../rt/suppFileMetadata/1/0/1 | urn:nbn:de:0000-test.t.v1i1.1.s11 |

Definition at line 341 of file FunctionalUrnPubIdPluginTestCase.php.

FunctionalUrnPubIdPluginTest::testDefaultSuffixPattern ( )

SCENARIO OUTLINE: Default suffix pattern GIVEN I have chosen {default pattern} WHEN I am on {editor/view and reader/generation page} THEN I see {URN} displayed on that page

EXAMPLES:

| object type | custom pattern | editor/view and reader/generation page | URN |

| issue | j.vvii | .../editor/issueData/1 | urn:nbn:de:0000-t.v1i19 | | issue | j.vvii | .../issue/view/1 | urn:nbn:de:0000-t.v1i19 | | article | j.vvii.a | .../editor/viewMetadata/1 | urn:nbn:de:0000-t.v1i1.18 | | article | j.vvii.a | .../article/view/1 + DC <meta>, Google <meta> | urn:nbn:de:0000-t.v1i1.18 | | galley | j.vvii.a.gg | .../editor/editGalley/1/1 | urn:nbn:de:0000-t.v1i1.1.g17 | | galley | j.vvii.a.gg | .../article/view/1 + DC <meta>, Google <meta> | urn:nbn:de:0000-t.v1i1.1.g17 | | supp file | j.vvii.a.ss | .../editor/editSuppFile/1/1?from=submissionEditing | urn:nbn:de:0000-t.v1i1.1.s19 | | supp file | j.vvii.a.ss | .../rt/suppFileMetadata/1/0/1 | urn:nbn:de:0000-t.v1i1.1.s19 |

Definition at line 305 of file FunctionalUrnPubIdPluginTestCase.php.

FunctionalUrnPubIdPluginTest::testRequiredCustomSuffixPatterns ( )

SCENARIO OUTLINE: No custom suffix pattern GIVEN I have selected an {object type} AND I have chosen the custom suffix pattern AND I have specified no custom suffix pattern for that object WHEN I click on the "Save" button THEN I see the error message "Please enter the URN suffix pattern for {object type}."

EXAMPLES:

| object type |

| issue | | article | | galley | | supp file |

Definition at line 255 of file FunctionalUrnPubIdPluginTestCase.php.

FunctionalUrnPubIdPluginTest::testRequiredFields ( )

SCENARIO: No prefix GIVEN I have specified no prefix WHEN I click on the "Save" button THEN I see the error message "Please enter the URN prefix."

SCENARIO OUTLINE: No object GIVEN I have selected no {object type} WHEN I click on the "Save" button THEN I see the error message "Please choose the objects URNs should be assigned to."

EXAMPLES:

| object type |

| issue | | article | | galley | | supp file |

Definition at line 199 of file FunctionalUrnPubIdPluginTestCase.php.

FunctionalUrnPubIdPluginTest::testSettingChanges ( )

SCENARIO: Change a setting GIVEN a URN is generated for an object WHEN I change a setting (object type, prefix, suffix generation, check number), e.g. choose another way the suffixes shoulg be generated THEN the URN for that object won't change

SCENARIO: Change a setting and reasign GIVEN a URN is generated for an object WHEN I change a setting (object type, prefix, suffix generation, check number), e.g. choose another way the suffixes shoulg be generated AND I press the button "Reasing URNs" THEN I see the changed URN for that object

Definition at line 557 of file FunctionalUrnPubIdPluginTestCase.php.

FunctionalUrnPubIdPluginTest::testValidPrefix ( )

SCENARIO: Valid prefix GIVEN I have specified a prefix that is not in the form WHEN I click on the "Save" button THEN I see the error message "The URN prefix pattern must be in the form 'urn:<NID>:<NSS>'."

Definition at line 228 of file FunctionalUrnPubIdPluginTestCase.php.


The documentation for this class was generated from the following file: