Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
FunctionalMedraExportTest Class Reference
Inheritance diagram for FunctionalMedraExportTest:
FunctionalDoiExportTest FunctionalImportExportBaseTestCase WebTestCase

Public Member Functions

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

Protected Member Functions

 checkThatPublisherIsJournalName ($xml)
 
 cleanXml ($xml)
 
 setUp ()
 
- Protected Member Functions inherited from FunctionalDoiExportTest
 assertConfigurationError ($exportPages, $expectedErrorMessage=null)
 
 assertXml ($files, $xml)
 
 checkDoiRegistration ($doi, $sampleFile, $expectedTargetUrl=null)
 
 checkThatPublisherIsJournalName ($xml)
 
 cleanXml ($xml)
 
 configurePlugin ($settings=array())
 
 doExportObjectTest ($objectType, $objectIds, $exportPlugin, $sampleFiles, $singleTest=false)
 
 fakeRouter ($host=null)
 
 getAffectedTables ()
 
 getSampleFileLocation ($fileName)
 
 removeRegisteredDois ($pluginName)
 
 setUp ($doiPrefix)
 
 tearDown ()
 
 testConfigurationError ($exportPages)
 
 testExpectJournalNameAsPublisher ()
 
 testExportAndRegisterObjectsViaCli ($exportPlugin, $command, $exportObjectType, $objectIds, $xmlFiles=null)
 
 testExportUnregisteredDois ($exportPlugin, $objects, $xmlFiles)
 
 testNonExistentJournalPathCliError ($exportPlugin)
 
 testNonExistentObjectIdCliError ($exportPlugin)
 
 testObjectsWithoutDOICannotBeSelectedForExport ($exportPages)
 
 testOutputFileNotWritableCliError ($exportPlugin)
 
 testPluginSettings ($tests, $inputTypes)
 
 testRegisterOrExportSpecificObjects ($pluginName, $objectTypes, $testAccount, $testReset=false)
 
 testRegisterUnregisteredDois ($pluginName, $expectedObjectCaptions, $testAccount)
 
 testUnsupportedObjectTypeCliError ($exportPlugin)
 
- Protected Member Functions inherited from FunctionalImportExportBaseTestCase
 executeCLI ($pluginName, $args)
 
 extractTarFile ($tarFile)
 
 getDomOnExport ($pluginUrl)
 
 getXmlOnExport ($pluginUrl, $postParams=array())
 
 getXpathOnExport ($pluginUrl)
 
 instantiatePlugin ($pluginName)
 
- Protected Member Functions inherited from WebTestCase
 getAffectedTables ()
 
 improveException ($e, $testObject)
 
 logIn ()
 
 setUp ()
 
 tearDown ()
 
 verified ()
 
 verifyAndOpen ($url)
 

Additional Inherited Members

- Public Attributes inherited from FunctionalDoiExportTest
 $pluginId
 

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, articles and supplementary files with the DOI registration agency mEDRA SO THAT these objects can be uniquely identified and discovered through public meta-data searches.

Definition at line 27 of file FunctionalMedraExportTest.php.

Member Function Documentation

FunctionalMedraExportTest::checkThatPublisherIsJournalName (   $xml)
protected
FunctionalMedraExportTest::cleanXml (   $xml)
protected
FunctionalMedraExportTest::setUp ( )
protected
See Also
PHPUnit_Framework_TestCase::setUp()

Definition at line 33 of file FunctionalMedraExportTest.php.

References Config\getVar().

FunctionalMedraExportTest::testConfigurationError ( )

SCENARIO OUTLINE: See FunctionalDoiExportTest::testConfigurationError().

EXAMPLES:

configuration error

no DOI prefix configured not configured the plug-in

Definition at line 320 of file FunctionalMedraExportTest.php.

References FunctionalDoiExportTest\assertConfigurationError(), and DAORegistry\getDAO().

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 344 of file FunctionalMedraExportTest.php.

References FunctionalDoiExportTest\configurePlugin(), and FunctionalDoiExportTest\removeRegisteredDois().

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 144 of file FunctionalMedraExportTest.php.

References FunctionalDoiExportTest\configurePlugin(), FunctionalDoiExportTest\doExportObjectTest(), and FunctionalDoiExportTest\removeRegisteredDois().

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 128 of file FunctionalMedraExportTest.php.

References FunctionalDoiExportTest\configurePlugin(), FunctionalDoiExportTest\doExportObjectTest(), and FunctionalDoiExportTest\removeRegisteredDois().

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 113 of file FunctionalMedraExportTest.php.

References FunctionalDoiExportTest\configurePlugin(), FunctionalDoiExportTest\doExportObjectTest(), and FunctionalDoiExportTest\removeRegisteredDois().

FunctionalMedraExportTest::testExportSerialIssueAsWork ( )

SCENARIO: see FunctionalDoiExportTest::testExpectJournalNameAsPublisher()

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 81 of file FunctionalMedraExportTest.php.

References FunctionalDoiExportTest\configurePlugin(), FunctionalDoiExportTest\doExportObjectTest(), FunctionalDoiExportTest\removeRegisteredDois(), and FunctionalDoiExportTest\testExpectJournalNameAsPublisher().

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 160 of file FunctionalMedraExportTest.php.

References FunctionalDoiExportTest\configurePlugin(), DAORegistry\getDAO(), HookRegistry\getHooks(), FunctionalImportExportBaseTestCase\instantiatePlugin(), HookRegistry\register(), and FunctionalDoiExportTest\removeRegisteredDois().

FunctionalMedraExportTest::testNonExistentJournalPathCliError ( )
FunctionalMedraExportTest::testNonExistentObjectIdCliError ( )
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 272 of file FunctionalMedraExportTest.php.

FunctionalMedraExportTest::testOutputFileNotWritableCliError ( )
FunctionalMedraExportTest::testPluginSettings ( )
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 224 of file FunctionalMedraExportTest.php.

FunctionalMedraExportTest::testRegisterUnregisteredDois ( )
FunctionalMedraExportTest::testUnsupportedObjectTypeCliError ( )
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 248 of file FunctionalMedraExportTest.php.

References WebTestCase\improveException(), and WebTestCase\logIn().


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