Open Journal Systems  3.3.0
PKPTestHelper Class Reference

Static Public Member Functions

static backupTables ($tables, $test)
 
static restoreDB ($test)
 
static restoreTables ($tables, $test)
 
static xdebugScream ($scream)
 

Detailed Description

Definition at line 17 of file PKPTestHelper.inc.php.

Member Function Documentation

◆ backupTables()

static PKPTestHelper::backupTables (   $tables,
  $test 
)
static

Backup the given tables.

Parameters
$tablesarray
$testPHPUnit_Framework_Assert

Definition at line 27 of file PKPTestHelper.inc.php.

References Config\getVar().

Referenced by DatabaseTestCase\setUp().

◆ restoreDB()

static PKPTestHelper::restoreDB (   $test)
static

Restore the database from a dump file.

Definition at line 85 of file PKPTestHelper.inc.php.

References Config\getVar().

Referenced by DatabaseTestCase\tearDown().

◆ restoreTables()

static PKPTestHelper::restoreTables (   $tables,
  $test 
)
static

Restore the given tables.

Parameters
$tablesarray
$testPHPUnit_Framework_Assert

Definition at line 66 of file PKPTestHelper.inc.php.

Referenced by DatabaseTestCase\tearDown().

◆ xdebugScream()

static PKPTestHelper::xdebugScream (   $scream)
static

Some 3rd-party libraries (i.e. adodb) use the PHP @ operator a lot which can lead to test failures when xdebug's scream parameter is on. This helper method can be used to safely (de)activate this.

If the xdebug extension is not installed then this method does nothing.

Parameters
$screamboolean

Definition at line 150 of file PKPTestHelper.inc.php.

Referenced by DatabaseTestCase\setUp(), XMLTypeDescriptionTest\tearDown(), DatabaseTestCase\tearDown(), and XMLTypeDescriptionTest\testInstantiateAndCheck().


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