Open Journal Systems  3.3.0
DatabaseTestCase Class Reference
Inheritance diagram for DatabaseTestCase:
PKPTestCase ControlledVocabTest DBConnectionTest DBDataXMLParserTest FilterDAOTest FilterGroupDAOTest PluginTestCase MetadataPluginTestCase PKPDc11MetadataPluginTest Dc11MetadataPluginTest

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')
 

Additional Inherited Members

- Public Member Functions inherited from PKPTestCase
 getActualOutput ()
 
- Data Fields inherited from PKPTestCase
 $mockedRegistryKeys = array()
 
 $registryBackup = array()
 

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

◆ getAffectedTables()

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.

Reimplemented in PluginTestCase, MetadataPluginTestCase, and FilterDAOTest.

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

Referenced by setUp(), and tearDown().

◆ setUp()

DatabaseTestCase::setUp ( )
protected

◆ tearDown()

DatabaseTestCase::tearDown ( )
protected

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