Omeka_Test_Resource_Db

Package: Test\Resource

class Omeka_Test_Resource_Db

extends Zend_Application_Resource_Db

Set up the database test environment by wiping and resetting the database to a recently-installed state.

property Omeka_Test_Resource_Db::$dropTables

Flag to determine whether the tables need to be dropped. This is a slow process, and really should only be happening once, when the tests are first run.

property Omeka_Test_Resource_Db::$runInstaller

Flag to determine whether the installer needs to be run.

Omeka_Test_Resource_Db::init()

Load and initialize the database.

Returns:Omeka_Db
Omeka_Test_Resource_Db::getDb()
Returns:Omeka_Db
Omeka_Test_Resource_Db::useTestConfig()
Omeka_Test_Resource_Db::setInstall($flag)

Set the flag that indicates whether or not to run the installer during init().

Parameters:
  • $flag (bool) –
Omeka_Test_Resource_Db::getDbAdapter()
Omeka_Test_Resource_Db::setDbAdapter(Zend_Db_Adapter_Abstract $dbAdapter)
Parameters:
  • $dbAdapter (Zend_Db_Adapter_Abstract) –
Omeka_Test_Resource_Db::_getOmekaDb()

Create a DB instance with the omeka_ prefix.

Returns:Omeka_Db
Omeka_Test_Resource_Db::_enableSqlLogging(Omeka_Db $db)
Parameters: