Open Monograph Press  1.1
 All Classes Namespaces Functions Variables Groups Pages
DatabaseTestCase Class Reference
Inheritance diagram for DatabaseTestCase:
PKPTestCase CitationDAOTest DBConnectionTest FilterDAOTest FilterGroupDAOTest FunctionalOaiBaseTestCase MetadataDescriptionDAOTest Mods34DescriptionTestCase PluginTestCase ProcessDAOTest

Protected Member Functions

 getAffectedTables ()
 
 setUp ()
 
 tearDown ()
 
- Protected Member Functions inherited from PKPTestCase
 getMockedDAOs ()
 
 getMockedRegistryKeys ()
 
 mockRequest ($path= 'index/test-page/test-op', $userId=null)
 
 setTestConfiguration ($config, $configPath= 'config')
 
 setUp ()
 
 tearDown ()
 

Additional Inherited Members

- Public Member Functions inherited from PKPTestCase
 getActualOutput ()
 

Detailed Description

Base class for unit tests that require database support. The schema TestName.setUp.xml will be installed before each individual test case (if present). The schema TestName.tearDown.xml may be used to clean up after each test case.

Definition at line 23 of file DatabaseTestCase.inc.php.

Member Function Documentation

DatabaseTestCase::getAffectedTables ( )
protected

Override this method if you want to backup/restore tables before/after the test.

Returns
array A list of tables to backup and restore.

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

Referenced by setUp(), and tearDown().

DatabaseTestCase::setUp ( )
protected

Definition at line 37 of file DatabaseTestCase.inc.php.

References getAffectedTables(), and DBConnection\getInstance().

DatabaseTestCase::tearDown ( )
protected

Definition at line 54 of file DatabaseTestCase.inc.php.

References getAffectedTables().


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