Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
FunctionalImportExportBaseTestCase Class Reference
Inheritance diagram for FunctionalImportExportBaseTestCase:
WebTestCase FunctionalCrossrefExportTest FunctionalDoiExportTest FunctionalNativeExportTest FunctionalNativeImportTest FunctionalPubIdsImportExportTest FunctionalPubmedExportTest FunctionalDataciteExportTest FunctionalMedraExportTest

Protected Member Functions

 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)
 

Detailed Description

Base class to test document export.

Definition at line 19 of file FunctionalImportExportBaseTestCase.inc.php.

Member Function Documentation

FunctionalImportExportBaseTestCase::executeCLI (   $pluginName,
  $args 
)
protected

Execute the plug-in via its CLI interface.

Parameters
$pluginNamestring
$argsarray
Returns
string CLI output

Definition at line 127 of file FunctionalImportExportBaseTestCase.inc.php.

References instantiatePlugin().

FunctionalImportExportBaseTestCase::extractTarFile (   $tarFile)
protected

Recursively unpack the given tar file and return its contents as an array.

Parameters
$tarFilestring
Returns
array

Definition at line 161 of file FunctionalImportExportBaseTestCase.inc.php.

References Config\getVar().

Referenced by getXmlOnExport(), and FunctionalDoiExportTest\testExportAndRegisterObjectsViaCli().

FunctionalImportExportBaseTestCase::getDomOnExport (   $pluginUrl)
protected

Retrieve the export as a DOM.

Parameters
$pluginUrlstring the url to be requested for export.
Returns
DOMDocument

Definition at line 100 of file FunctionalImportExportBaseTestCase.inc.php.

References getXmlOnExport().

Referenced by getXpathOnExport().

FunctionalImportExportBaseTestCase::getXmlOnExport (   $pluginUrl,
  $postParams = array() 
)
protected

Retrieve the export as an XML string.

Parameters
$pluginUrlstring the url to be requested for export.
$postParamsarray additional post parameters
Returns
string

Definition at line 30 of file FunctionalImportExportBaseTestCase.inc.php.

References extractTarFile(), String\regexp_match(), and String\regexp_match_get().

Referenced by FunctionalDoiExportTest\doExportObjectTest(), getDomOnExport(), and FunctionalDoiExportTest\testExportUnregisteredDois().

FunctionalImportExportBaseTestCase::getXpathOnExport (   $pluginUrl)
protected

Export into XML and return an XPath object on this XML.

Parameters
$pluginUrlstring the url to be requested for export.
Returns
DOMXPath

Definition at line 113 of file FunctionalImportExportBaseTestCase.inc.php.

References getDomOnExport().

Referenced by FunctionalCrossrefExportTest\testDoi().

FunctionalImportExportBaseTestCase::instantiatePlugin (   $pluginName)
protected

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