Open Journal Systems  3.3.0
FunctionalMedraExportTest Class Reference
Inheritance diagram for FunctionalMedraExportTest:

Public Member Functions

 testConfigurationError ()
 
 testExportAndRegisterObjectsViaCli ()
 
 testExportSerialArticleAsManifestation ()
 
 testExportSerialArticleAsWork ()
 
 testExportSerialIssueAsManifestation ()
 
 testExportSerialIssueAsWork ()
 
 testExportUnregisteredDois ()
 
 testNonExistentJournalPathCliError ()
 
 testNonExistentObjectIdCliError ()
 
 testObjectsWithoutDOICannotBeSelectedForExport ()
 
 testOutputFileNotWritableCliError ()
 
 testPluginSettings ()
 
 testRegisterOrExportSpecificObjects ()
 
 testRegisterUnregisteredDois ()
 
 testUnsupportedObjectTypeCliError ()
 
 testWorkProductExplanation ()
 

Data Fields

const TEST_ACCOUNT = 'TEST_OJS'
 

Protected Member Functions

 checkThatPublisherIsJournalName ($xml)
 
 cleanXml ($xml)
 
 setUp ()
 

Detailed Description

Test the mEDRA plug-in.

FEATURE: mEDRA DOI registration and export AS A journal manager I WANT to be able to register DOIs for issues and articles with the DOI registration agency mEDRA SO THAT these objects can be uniquely identified and discovered through public meta-data searches.

Definition at line 26 of file FunctionalMedraExportTestCase.php.

Member Function Documentation

◆ checkThatPublisherIsJournalName()

FunctionalMedraExportTest::checkThatPublisherIsJournalName (   $xml)
protected

SCENARIO: see FunctionalDoiExportTest::doTestExpectJournalNameAsPublisher()

Definition at line 91 of file FunctionalMedraExportTestCase.php.

◆ cleanXml()

FunctionalMedraExportTest::cleanXml (   $xml)
protected
See also
FunctionalDoiExportTest::cleanXml()

Definition at line 400 of file FunctionalMedraExportTestCase.php.

References PKPString\regexp_replace().

◆ setUp()

FunctionalMedraExportTest::setUp ( )
protected
See also
PHPUnit_Framework_TestCase::setUp()

Definition at line 32 of file FunctionalMedraExportTestCase.php.

References Config\getVar().

◆ testConfigurationError()

FunctionalMedraExportTest::testConfigurationError ( )

SCENARIO OUTLINE: See FunctionalDoiExportTest::testConfigurationError().

EXAMPLES:

configuration error

no DOI prefix configured not configured the plug-in

Definition at line 315 of file FunctionalMedraExportTestCase.php.

References DAORegistry\getDAO().

◆ testExportAndRegisterObjectsViaCli()

FunctionalMedraExportTest::testExportAndRegisterObjectsViaCli ( )

SCENARIO OUTLINE: CLI export, see FunctionalDoiExportTest::testExportAndRegisterObjectsViaCli().

EXAMPLES:

export plug-in |settings |export object type|object ids|XML file =================|===================|==================|==========|===================================== MedraExportPlugin|exp. issues as work|issues |1 |serial-issue-as-work.xml MedraExportPlugin|exp. issues as man.|issues |1 |serial-issue-as-manifestation.xml MedraExportPlugin|exp. issues as work|articles |1 |serial-article-as-work-1.xml MedraExportPlugin|exp. issues as man.|galleys |1 |serial-article-as-manifestation-1.xml MedraExportPlugin|exp. issues as man.|galleys |1 2 3 |serial-article-as-manifestation-2.xml

Definition at line 339 of file FunctionalMedraExportTestCase.php.

◆ testExportSerialArticleAsManifestation()

FunctionalMedraExportTest::testExportSerialArticleAsManifestation ( )

SCENARIO OUTLINE: see FunctionalDoiExportTest::doExportObjectTest().

EXAMPLES: export plug-in |options |object type|object id(s)|export format |sample file(s) =================|===================|===========|============|==========================|===================================== MedraExportPlugin|exp. issues as man.|galley |1 |O4DOI serial art. as man. |serial-article-as-manifestation-1.xml MedraExportPlugin|exp. issues as man.|galley |1,2,3 |O4DOI serial art. as man. |serial-article-as-manifestation-2.xml

Definition at line 143 of file FunctionalMedraExportTestCase.php.

◆ testExportSerialArticleAsWork()

FunctionalMedraExportTest::testExportSerialArticleAsWork ( )

SCENARIO OUTLINE: see FunctionalDoiExportTest::doExportObjectTest().

EXAMPLES: export plug-in |options |object type|object id(s)|export format |sample file(s) =================|===================|===========|============|==========================|===================================== MedraExportPlugin|exp. issues as work|article |1 |O4DOI serial art. as work |serial-article-as-work-1.xml

Definition at line 127 of file FunctionalMedraExportTestCase.php.

◆ testExportSerialIssueAsManifestation()

FunctionalMedraExportTest::testExportSerialIssueAsManifestation ( )

SCENARIO OUTLINE: see FunctionalDoiExportTest::doExportObjectTest().

EXAMPLES: export plug-in |options |object type|object id(s)|export format |sample file(s) =================|===================|===========|============|==========================|===================================== MedraExportPlugin|exp. issues as man.|issue |1 |O4DOI serial issue as man.|serial-issue-as-manifestation.xml

Definition at line 112 of file FunctionalMedraExportTestCase.php.

◆ testExportSerialIssueAsWork()

FunctionalMedraExportTest::testExportSerialIssueAsWork ( )

SCENARIO: see FunctionalDoiExportTest::doTestExpectJournalNameAsPublisher()

SCENARIO OUTLINE: see FunctionalDoiExportTest::doExportObjectTest().

EXAMPLES: export plug-in |options |object type|object id(s)|export format |sample file(s) =================|===================|===========|============|==========================|===================================== MedraExportPlugin|exp. issues as work|issue |1 |O4DOI serial issue as work|serial-issue-as-work.xml

Definition at line 80 of file FunctionalMedraExportTestCase.php.

◆ testExportUnregisteredDois()

FunctionalMedraExportTest::testExportUnregisteredDois ( )

SCENARIO OUTLINE: see FunctionalDoiExportTest::testExportUnregisteredDois().

EXAMPLES: export plug-in |objects |XML files =================|======================================|============================================================================== MedraExportPlugin|issue 1; article 1; galleys 1, 2 and 3|serial-article-as-{work,manifestation}-2.xml,serial-issue-as-manifestation.xml

Definition at line 159 of file FunctionalMedraExportTestCase.php.

References DAORegistry\getDAO(), HookRegistry\getHooks(), and HookRegistry\register().

◆ testNonExistentJournalPathCliError()

FunctionalMedraExportTest::testNonExistentJournalPathCliError ( )

SCENARIO: See FunctionalDoiExportTest::testNonExistentJournalPathCliError().

Definition at line 373 of file FunctionalMedraExportTestCase.php.

◆ testNonExistentObjectIdCliError()

FunctionalMedraExportTest::testNonExistentObjectIdCliError ( )

SCENARIO: See FunctionalDoiExportTest::testNonExistentObjectIdCliError().

Definition at line 389 of file FunctionalMedraExportTestCase.php.

◆ testObjectsWithoutDOICannotBeSelectedForExport()

FunctionalMedraExportTest::testObjectsWithoutDOICannotBeSelectedForExport ( )

SCENARIO OUTLINE: see FunctionalDoiExportTest::testObjectsWithoutDOICannotBeSelectedForExport().

EXAMPLES:

export page

.../manager/importexport/plugin/MedraExportPlugin/issues .../manager/importexport/plugin/MedraExportPlugin/articles .../manager/importexport/plugin/MedraExportPlugin/galleys .../manager/importexport/plugin/MedraExportPlugin/all

Definition at line 267 of file FunctionalMedraExportTestCase.php.

◆ testOutputFileNotWritableCliError()

FunctionalMedraExportTest::testOutputFileNotWritableCliError ( )

SCENARIO: See FunctionalDoiExportTest::testOutputFileNotWritableCliError().

Definition at line 381 of file FunctionalMedraExportTestCase.php.

◆ testPluginSettings()

FunctionalMedraExportTest::testPluginSettings ( )

SCENARIO: See FunctionalDoiExportTest::testPluginSettings().

Definition at line 275 of file FunctionalMedraExportTestCase.php.

◆ testRegisterOrExportSpecificObjects()

FunctionalMedraExportTest::testRegisterOrExportSpecificObjects ( )

SCENARIO OUTLINE: see FunctionalDoiExportTest::testRegisterOrExportSpecificObjects().

EXAMPLES: object |export page |register or export ========|===========================================================|================== Issue |.../manager/importexport/plugin/MedraExportPlugin/issues |Register Issue |.../manager/importexport/plugin/MedraExportPlugin/issues |Export Article |.../manager/importexport/plugin/MedraExportPlugin/articles |Register Article |.../manager/importexport/plugin/MedraExportPlugin/articles |Export Galley |.../manager/importexport/plugin/MedraExportPlugin/galleys |Register Galley |.../manager/importexport/plugin/MedraExportPlugin/galleys |Export

SCENARIO: Reset button. GIVEN I already registered an object once WHEN I am navigating to the list containing the object THEN I'll see an additional "Reset" button

SCENARIO: Reset the registration state. WHEN I click on the "Reset" button in an object list THEN all internal registration state will be deleted AND the registration button will read "Register" rather than "Update" again AND I will no longer see an additional "Reset" button.

Definition at line 223 of file FunctionalMedraExportTestCase.php.

◆ testRegisterUnregisteredDois()

FunctionalMedraExportTest::testRegisterUnregisteredDois ( )

SCENARIO: See FunctionalDoiExportTest::testRegisterUnregisteredDois().

Definition at line 231 of file FunctionalMedraExportTestCase.php.

◆ testUnsupportedObjectTypeCliError()

FunctionalMedraExportTest::testUnsupportedObjectTypeCliError ( )

SCENARIO: See FunctionalDoiExportTest::testUnsupportedObjectTypeCliError().

Definition at line 365 of file FunctionalMedraExportTestCase.php.

◆ testWorkProductExplanation()

FunctionalMedraExportTest::testWorkProductExplanation ( )

SCENARIO: Explain the work/product distinction

WHEN I navigate to the mEDRA export plug-in home page or article export page THEN I'll see an explanatory text: "DOIs assigned to articles will be exported to mEDRA as 'works'. DOIs assigned to galleys will be exported as 'manifestations'." AND the words 'work' and 'manifestation' will link to http://www.medra.org/en/metadata_td.htm.

Definition at line 247 of file FunctionalMedraExportTestCase.php.

Field Documentation

◆ TEST_ACCOUNT

const FunctionalMedraExportTest::TEST_ACCOUNT = 'TEST_OJS'

Definition at line 27 of file FunctionalMedraExportTestCase.php.


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