Omeka_Test_Resource_Db¶
- class Omeka_Test_Resource_Db¶
Package: Test\Resource
Set up the database test environment by wiping and resetting the database to a recently-installed state.
- property 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 runInstaller¶
Flag to determine whether the installer needs to be run.
- property _cachedAdapter¶
Avoid issues with database connections not closing properly after each test run.
- init()¶
Load and initialize the database.
Returns: Omeka_Db
- getDb()¶
Returns: Omeka_Db
- useTestConfig()¶
- setInstall(boolean $flag)¶
Set the flag that indicates whether or not to run the installer during init().
Parameters: - $flag (boolean) –
- getDbAdapter()¶
- setDbAdapter(Zend_Db_Adapter_Abstract $dbAdapter)¶
Parameters: - $dbAdapter (Zend_Db_Adapter_Abstract) –