Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
FunctionalImportExportBaseTestCase Class Reference
Inheritance diagram for FunctionalImportExportBaseTestCase:
WebTestCase

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 ($username= 'admin', $password=null)
 
 setUp ()
 
 submitAjaxForm ($formId)
 
 tearDown ()
 
 typeText ($box, $letters)
 
 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().

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 getDomOnExport().

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().

FunctionalImportExportBaseTestCase::instantiatePlugin (   $pluginName)
protected

Instantiate an import-export plugin.

Parameters
$pluginNamestring
Returns
ImportExportPlugin

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

References PluginRegistry\getPlugin(), and PluginRegistry\loadCategory().

Referenced by executeCLI().


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