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

Public Member Functions

 testConfigurationError ()
 
 testExportAndRegisterObjectsViaCli ()
 
 testExportArticle ()
 
 testExportGalley ()
 
 testExportIssue ()
 
 testExportSuppFile ()
 
 testExportUnregisteredDois ()
 
 testNonExistentJournalPathCliError ()
 
 testNonExistentObjectIdCliError ()
 
 testObjectsWithoutDOICannotBeSelectedForExport ()
 
 testOutputFileNotWritableCliError ()
 
 testPluginSettings ()
 
 testRegisterOrExportSpecificObjects ()
 
 testRegisterUnregisteredDois ()
 
 testUnsupportedObjectTypeCliError ()
 

Protected Member Functions

 checkDoiRegistration ($doi, $sampleFile, $expectedTargetUrl)
 
 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 DataCite plug-in.

FEATURE: DataCite 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 DataCite SO THAT these objects can be uniquely identified and discovered through public meta-data searches.

Definition at line 27 of file FunctionalDataciteExportTest.php.

Member Function Documentation

FunctionalDataciteExportTest::checkDoiRegistration (   $doi,
  $sampleFile,
  $expectedTargetUrl 
)
protected
FunctionalDataciteExportTest::checkThatPublisherIsJournalName (   $xml)
protected
FunctionalDataciteExportTest::cleanXml (   $xml)
protected
FunctionalDataciteExportTest::setUp ( )
protected
See Also
PHPUnit_Framework_TestCase::setUp()

Definition at line 36 of file FunctionalDataciteExportTest.php.

References FunctionalDoiExportTest\configurePlugin(), and Config\getVar().

FunctionalDataciteExportTest::testConfigurationError ( )

SCENARIO OUTLINE: See FunctionalDoiExportTest::testConfigurationError().

EXAMPLES:

configuration error

no DOI prefix configured

Definition at line 271 of file FunctionalDataciteExportTest.php.

FunctionalDataciteExportTest::testExportAndRegisterObjectsViaCli ( )

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

EXAMPLES:

export plug-in |settings|export object type|object ids|XML file ====================|========|==================|==========|===================================== DataciteExportPlugin|./. |issues |1 |datacite-issue.xml DataciteExportPlugin|./. |articles |1 |datacite-article.xml DataciteExportPlugin|./. |galleys |1 |datacite-galley-1.xml DataciteExportPlugin|./. |galleys |1 2 3 |datacite-galley-{1,2,3}.xml DataciteExportPlugin|./. |suppFiles |1 |datacite-supp-file.xml

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

EXAMPLES: export plug-in |settings|export object type|object ids ====================|========|==================|========== DataciteExportPlugin|./. |issues |1 DataciteExportPlugin|./. |articles |1 DataciteExportPlugin|./. |galleys |1 DataciteExportPlugin|./. |galleys |1 2 3 DataciteExportPlugin|./. |suppFiles |1

Definition at line 301 of file FunctionalDataciteExportTest.php.

FunctionalDataciteExportTest::testExportArticle ( )

SCENARIO OUTLINE: see FunctionalDoiExportTest::doExportObjectTest().

EXAMPLES: export plug-in |options|object type|object id(s)|export format |sample file(s) ====================|=======|===========|============|=================|==================== DataciteExportPlugin|./. |article |1 |DataCite resource|datacite-article.xml

Definition at line 118 of file FunctionalDataciteExportTest.php.

References FunctionalDoiExportTest\doExportObjectTest().

FunctionalDataciteExportTest::testExportGalley ( )

SCENARIO OUTLINE: see FunctionalDoiExportTest::doExportObjectTest().

EXAMPLES: export plug-in |options|object type|object id(s)|export format |sample file(s) ====================|=======|===========|============|=================|=========================== DataciteExportPlugin|./. |galley |1,2,3 |DataCite resource|datacite-galley-{1,2,3}.xml

Definition at line 131 of file FunctionalDataciteExportTest.php.

References FunctionalDoiExportTest\doExportObjectTest().

FunctionalDataciteExportTest::testExportIssue ( )

SCENARIO OUTLINE: see FunctionalDoiExportTest::doExportObjectTest().

EXAMPLES: export plug-in |options|object type|object id(s)|export format |sample file(s) ====================|=======|===========|============|=================|================== DataciteExportPlugin|./. |issue |1 |DataCite resource|datacite-issue.xml

Definition at line 80 of file FunctionalDataciteExportTest.php.

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

FunctionalDataciteExportTest::testExportSuppFile ( )

SCENARIO OUTLINE: see FunctionalDoiExportTest::doExportObjectTest().

EXAMPLES: export plug-in |options|object type|object id(s)|export format |sample file(s) ====================|=======|===========|============|=================|====================== DataciteExportPlugin|./. |supp file |1 |DataCite resource|datacite-supp-file.xml

Definition at line 149 of file FunctionalDataciteExportTest.php.

References FunctionalDoiExportTest\doExportObjectTest().

FunctionalDataciteExportTest::testExportUnregisteredDois ( )

SCENARIO OUTLINE: see FunctionalDoiExportTest::testExportUnregisteredDois().

EXAMPLES: export plug-in |objects |XML files ====================|===================================================|========================================================================================== DataciteExportPlugin|issue 1; article 1; galleys 1, 2 and 3; supp-file 1|datacite-article.xml,datacite-galley-{1,2,3}.xml,datacite-issue.xml,datacite-supp-file.xml

Definition at line 162 of file FunctionalDataciteExportTest.php.

FunctionalDataciteExportTest::testNonExistentJournalPathCliError ( )
FunctionalDataciteExportTest::testNonExistentObjectIdCliError ( )
FunctionalDataciteExportTest::testObjectsWithoutDOICannotBeSelectedForExport ( )

SCENARIO OUTLINE: see FunctionalDoiExportTest::testObjectsWithoutDOICannotBeSelectedForExport().

EXAMPLES:

export page

.../manager/importexport/plugin/DataciteExportPlugin/issues .../manager/importexport/plugin/DataciteExportPlugin/articles .../manager/importexport/plugin/DataciteExportPlugin/galleys .../manager/importexport/plugin/DataciteExportPlugin/suppFiles .../manager/importexport/plugin/DataciteExportPlugin/all

Definition at line 236 of file FunctionalDataciteExportTest.php.

FunctionalDataciteExportTest::testOutputFileNotWritableCliError ( )
FunctionalDataciteExportTest::testPluginSettings ( )
FunctionalDataciteExportTest::testRegisterOrExportSpecificObjects ( )

SCENARIO OUTLINE: see FunctionalDoiExportTest::testRegisterOrExportSpecificObjects().

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

Definition at line 196 of file FunctionalDataciteExportTest.php.

FunctionalDataciteExportTest::testRegisterUnregisteredDois ( )
FunctionalDataciteExportTest::testUnsupportedObjectTypeCliError ( )

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