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

Public Member Functions

 testCheckForDuplicateUrlSuffixesAcrossObjectTypes ()
 
 testDoiCustomSuffixPattern ()
 
 testDoiCustomSuffixPatternEmptyNotAllowed ()
 
 testDoiDisabled ()
 
 testDoiDisplayWithDefaultPatternOnAllPages ()
 
 testDoiPrefix ()
 
 testDoiSuffixIsCustomId ()
 
 testDoiSuffixIsCustomUrlSuffix ()
 
 testDoiWillNotChangeWithoutReset ()
 
 testPreviewArticleDoi ()
 

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 DOI PubId plug-in.

FEATURE: DOI generation settings and display AS A journal manager I WANT to be able to assign DOIs to issues, articles, galleys and supplementary files of my journal according to my institutional prefix and suffix generation strategy SO THAT they can be uniquely identified for intellectual property transactions, in citations and look-up in meta-data databases and institutional repositories.

Definition at line 28 of file FunctionalDoiPubIdPluginTestCase.php.

Member Function Documentation

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

Definition at line 732 of file FunctionalDoiPubIdPluginTestCase.php.

FunctionalDOIPubIdPluginTest::setUp ( )
protected

BACKGROUND: GIVEN I am on the journal settings page step 1 (details)

See Also
WebTestCase::setUp()

Definition at line 53 of file FunctionalDoiPubIdPluginTestCase.php.

References WebTestCase\logIn().

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

Definition at line 713 of file FunctionalDoiPubIdPluginTestCase.php.

FunctionalDOIPubIdPluginTest::testCheckForDuplicateUrlSuffixesAcrossObjectTypes ( )

SCENARIO OUTLINE: Check for duplicate url suffixes across object types GIVEN I already assigned the custom identifier “doitest” to a {publication object} in the database WHEN I select the "custom identifier" option AND I navigate to the {meta-data page} of another object AND I enter that same custom identifier for the other object AND I click the “Save” button THEN the object will not be saved AND the form will redisplay with an error message "...".

EXAMPLES: publication object | meta-data page ===================|======================== issue | editor/editSuppFile/1/1 article | editor/issueData/1 galley | editor/viewMetadata/1 supp file | editor/editGalley/1/1

Definition at line 426 of file FunctionalDoiPubIdPluginTestCase.php.

References DAORegistry\getDAO(), WebTestCase\improveException(), and PluginRegistry\loadCategory().

FunctionalDOIPubIdPluginTest::testDoiCustomSuffixPattern ( )

SCENARIO OUTLINE: Custom pattern for suffix generation WHEN I select the "custom pattern" suffix generation strategy THEN DOI suffixes for {object type} must be generated according to the GIVEN {custom pattern} where j stands for the initials of the journal, v for the issue's volume, i for the issue number, a, g, s for the internal OJS article, galley and supp file IDs respectively, p for the page number and Y for the publication year.

EXAMPLES: object type | custom pattern ============|================== issue | jorj.Y.volv article | jorj.issi.arta galley | jorj.arta.galg supp file | jorj.arta.sufs

Definition at line 274 of file FunctionalDoiPubIdPluginTestCase.php.

FunctionalDOIPubIdPluginTest::testDoiCustomSuffixPatternEmptyNotAllowed ( )

SCENARIO: Empty custom pattern not allowed WHEN I select the "individual DOI suffix" option AND I do not enter any suffix generation patterns for an enabled publishing object THEN an error message should alert me that I must enter a pattern for enabled objects AND no error message appears when leaving fields of non-enabled publishing objects empty.

Definition at line 303 of file FunctionalDoiPubIdPluginTestCase.php.

FunctionalDOIPubIdPluginTest::testDoiDisabled ( )

SCENARIO OUTLINE: Disabled DOIs WHEN I disable DOIs for {object type} AND I open up the {object page} THEN no issue DOI will appear anywhere on that page.

EXAMPLES: object type | object page ============|========================================== issue | .../issue/view/1 article | .../article/view/1 article | .../rt/metadata/1/0 article | .../rt/captureCite/1/0/ApaCitationPlugin galley | .../article/view/1/1 supp file | .../rt/suppFileMetadata/1/0/1

Definition at line 217 of file FunctionalDoiPubIdPluginTestCase.php.

FunctionalDOIPubIdPluginTest::testDoiDisplayWithDefaultPatternOnAllPages ( )

SCENARIO OUTLINE: Display of DOIs for various journal objects WHEN I enable DOIs for {object type} AND I open up the {object page} THEN an issue DOI will appear on that page in the given {display format}.

EXAMPLES: object type | object page | display format ============|==========================================|============================ issue | .../issue/view/1 | visible (10.xxxx/xxx) article | .../article/view/1 | visible (10.xxxx/xxx), | | DC <meta>, Google <meta> article | .../rt/metadata/1/0 | visible (10.xxxx/xxx) article | .../rt/captureCite/1/0/ApaCitationPlugin | visible (APA citation) galley | .../article/view/1/1 | visible (10.xxxx/xxx) | | DC <meta>, Google <meta> supp file | .../rt/suppFileMetadata/1/0/1 | visible (10.xxxx/xxx)

SCENARIO OUTLINE: Standard pattern for suffix generation WHEN I select the "default pattern" suffix generation strategy THEN DOI suffixes for {object type} must follow a certain {default pattern} where j stands for the initials of the journal, v for the issue's volume, i for the issue number, a, g, s for the internal OJS article, galley and supp file IDs respectively, and p for the page number.

EXAMPLES: object type | default pattern ============|================ article | j.vi.a issue | j.vi galley | j.vi.a.gg supp file | j.vi.a.ss

Definition at line 177 of file FunctionalDoiPubIdPluginTestCase.php.

FunctionalDOIPubIdPluginTest::testDoiPrefix ( )

SCENARIO OUTLINE: Individual journal prefix WHEN I set the {DOI prefix} THEN all DOIs for issues, articles, galleys and supp files must start with that prefix (i.e. {DOI prefix}/xxx).

EXAMPLES:

DOI prefix

10.1234 10.4321

Definition at line 246 of file FunctionalDoiPubIdPluginTestCase.php.

FunctionalDOIPubIdPluginTest::testDoiSuffixIsCustomId ( )

SCENARIO OUTLINE: Suffix generation based on custom ID (URL independent) WHEN I select the "individual DOI suffix" option THEN I see an input field for the individual identifier on the {object type}s meta-data entry page as long as no DOI has been generated yet AND the {generated DOI} for a GIVEN {object type} must be equal to the prefix plus the {individual identifier} or - if no identifier has been entered - no DOI will be generated AND the internal id - if used - must be preceded by some unique object type dependent letter to avoid duplicate DOIs, except for articles where no letter will be used to maintain backwards compatibility.

EXAMPLES: object type | individual identifier | generated DOI ============|=======================|=============================== article | article_suffix | 10.1234/article_suffix article | ./. | ./. issue | issue_suffix | 10.1234/issue_suffix issue | ./. | ./. galley | article_galley_suffix | 10.1234/article_galley_suffix galley | ./. | ./. supp file | supp_file_suffix | 10.1234/supp_file_suffix supp file | ./. | ./.

SCENARIO OUTLINE: Delete custom suffix. GIVEN I select the "individual DOI suffix" option AND I already assigned a custom DOI suffix to a {publication object} BUT a DOI has not yet been generated for that object WHEN I empty the custom suffix field for that object on its corresponding {meta-data page} AND I click the “Save” button THEN the existing custom DOI suffix should be deleted in the database.

EXAMPLES: publication object | meta-data page ===================|======================== issue | editor/issueData/1 article | editor/viewMetadata/1 galley | editor/editGalley/1/1 supp file | editor/editSuppFile/1/1

Definition at line 553 of file FunctionalDoiPubIdPluginTestCase.php.

FunctionalDOIPubIdPluginTest::testDoiSuffixIsCustomUrlSuffix ( )

SCENARIO OUTLINE: Suffix generation based on custom ID (custom URL suffix) WHEN I select the "custom identifier" option THEN the {generated DOI} for a GIVEN {object type} must be equal to the prefix plus the {custom identifier} or - in the absence of such an identifier - equal to the internal {object id} of the corresponding publication object AND the internal id - if used - must be preceded by some unique object type dependent letter to avoid duplicate DOIs, except for articles where no letter will be used to maintain backwards compatibility.

EXAMPLES: object type | custom identifier | object id | generated DOI ============|====================|===========|=========================== issue | issue_url | 1 | 10.1234/issue_url issue | | 1 | 10.1234/i1 article | article_url | 1 | 10.1234/article_url article | | 1 | 10.1234/1 galley | article_galley_url | 1 | 10.1234/article_galley_url galley | | 1 | 10.1234/g1 supp file | supp_file_url | 1 | 10.1234/supp_file_url supp file | | 1 | 10.1234/s1

Definition at line 365 of file FunctionalDoiPubIdPluginTestCase.php.

FunctionalDOIPubIdPluginTest::testDoiWillNotChangeWithoutReset ( )

SCENARIO: Suffixes must be persistent GIVEN a suffix has already been generated for an object WHEN I change the suffix generation strategy THEN the already assigned suffix of the object will not change to guarantee a persistent object identifier.

SCENARIO: Reassigning suffixes GIVEN a suffix has already been generated for an object WHEN I go to the DOI settings page AND I choose a suffix generation strategy different from the one that had been used previously for the object AND I click the "Reassign DOIs" button THEN the suffix for this object (and all other objects) will change.

Definition at line 626 of file FunctionalDoiPubIdPluginTestCase.php.

FunctionalDOIPubIdPluginTest::testPreviewArticleDoi ( )

SCENARIO OUTLINE: Preview DOI of published articles. WHEN I choose {suffix generation method} AND I open the metadata page of an published article that does not yet have a DOI generated THEN I'll see a {DOI preview} without a DOI being generated.

EXAMPLES:

suffix generation method | DOI preview

default pattern | 10.1234/t.v1i1.1 custom pattern | 10.1234/jort.iss1.art1 custom url suffix | 10.1234/custom-url

SCENARIO OUTLINE: Preview DOI of unpublished articles. WHEN I choose {suffix generation method} AND I open the metadata page of an unpublished article THEN I'll see a {partial DOI preview} even if the article is not yet published AND a DOI will not be generated.

EXAMPLES:

suffix generation method | partial DOI preview

default pattern | 10.1234/t.vvii.2 custom pattern | 10.1234/jort.issi.art2 custom url suffix | 10.1234/2

Definition at line 679 of file FunctionalDoiPubIdPluginTestCase.php.


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