TestDatabase
Extends PHPUnit_Extensions_Database_TestCaseAbstract test case class for database testing.
| since |
1.0 |
|---|---|
| deprecated |
2.0 Deprecated due to the deprecation of |
| package |
Joomla Framework |
Methods
assignMockCallbacks
Assigns mock callbacks to methods.
assignMockCallbacks(\PHPUnit_Framework_MockObject_MockObject mockObject, array array) : void
| note |
This method assumes that the mock callback is named {mock}{method name}. |
|---|---|
| since |
1.0 |
| deprecated |
2.0 Use TestHelper::assignMockCallbacks instead |
Arguments
- mockObject
\PHPUnit_Framework_MockObject_MockObjectThe mock object that the callbacks are being assigned to.- array
arrayAn array of methods names to mock with callbacks.
assignMockReturns
Assigns mock values to methods.
assignMockReturns(\PHPUnit_Framework_MockObject_MockObject mockObject, array array) : void
| since |
1.0 |
|---|---|
| deprecated |
2.0 Use TestHelper::assignMockReturns instead |
Arguments
- mockObject
\PHPUnit_Framework_MockObject_MockObjectThe mock object.- array
arrayAn associative array of methods to mock with return values: string (method name) => mixed (return value)
getConnection
Returns the default database connection for running the tests.
getConnection() : \PHPUnit_Extensions_Database_DB_IDatabaseConnection
| since |
1.0 |
|---|---|
| deprecated |
2.0 |
Response
\PHPUnit_Extensions_Database_DB_IDatabaseConnection
getDataSet
Gets the data set to be loaded into the database during setup
getDataSet() : \PHPUnit_Extensions_Database_DataSet_IDataSet
| since |
1.0 |
|---|---|
| deprecated |
2.0 |
Response
\PHPUnit_Extensions_Database_DataSet_IDataSet
getSetUpOperation
Returns the database operation executed in test setup.
getSetUpOperation() : \PHPUnit_Extensions_Database_Operation_IDatabaseOperation
| since |
1.0 |
|---|---|
| deprecated |
2.0 |
Response
\PHPUnit_Extensions_Database_Operation_IDatabaseOperation
getTearDownOperation
Returns the database operation executed in test cleanup.
getTearDownOperation() : \PHPUnit_Extensions_Database_Operation_IDatabaseOperation
| since |
1.0 |
|---|---|
| deprecated |
2.0 |
Response
\PHPUnit_Extensions_Database_Operation_IDatabaseOperation
setUp
Sets up the fixture.
setUp() : void
This method is called before a test is executed.
| since |
1.0 |
|---|---|
| deprecated |
2.0 |
setUpBeforeClass
This method is called before the first test of this test class is run.
setUpBeforeClass() : void
| since |
1.0 |
|---|---|
| deprecated |
2.0 |
tearDownAfterClass
This method is called after the last test of this test class is run.
tearDownAfterClass() : void
| since |
1.0 |
|---|---|
| deprecated |
2.0 |
Properties
driver
The active database driver being used for the tests.
| since |
1.0 |
|---|---|
| deprecated |
2.0 |
Type(s)
\Joomla\Database\DatabaseDriver