|
| __construct ($name=NULL, array $data=array(), $dataName= '') |
|
|
| $testDatabase = '' |
|
| $backupGlobals = FALSE |
|
| $backupStaticAttributes = FALSE |
|
Tx_Phpunit_Database_TestCase::__construct |
( |
|
$name = NULL , |
|
|
array |
$data = array() , |
|
|
|
$dataName = '' |
|
) |
| |
Constructs a test case with the given name.
- Parameters
-
string | $name | the name of a testcase |
array | $data | ? |
string | $dataName | ? |
Tx_Phpunit_Database_TestCase::getDatabaseTables |
( |
|
$databaseName = NULL | ) |
|
|
protected |
Gets the names of all tables in the database with the given name.
- Parameters
-
string | $databaseName | the name of the database from which to retrieve the table names, if none is provided, the name of the current TYPO3 database plus a suffix "_test" is used |
- Returns
- array<string> the names of all tables in the database $databaseName, might be empty
Tx_Phpunit_Database_TestCase::importExtensions |
( |
array |
$extensions, |
|
|
|
$importDependencies = FALSE , |
|
|
array & |
$skipDependencies = array() |
|
) |
| |
|
protected |
Imports the ext_tables.sql statements from the given extensions.
- Parameters
-
array | $extensions | keys of the extensions to import, may be empty |
boolean | $importDependencies | whether to import dependency extensions on which the given extensions depend as well |
array | &$skipDependencies | keys of the extensions to skip, may be empty, will be modified |
- Returns
- void
Tx_Phpunit_Database_TestCase::importStdDb |
( |
| ) |
|
|
protected |
Imports the data from the stddb tables.sql file.
Example/intended usage:
public function setUp() {
$this->createDatabase();
$db = $this->useTestDatabase();
$this->importStdDB();
$this->importExtensions(array('cms', 'static_info_tables', 'templavoila'));
}
- Returns
- void
Tx_Phpunit_Database_TestCase::selectDatabase |
( |
|
$databaseName, |
|
|
t3lib_DB |
$database |
|
) |
| |
|
protected |
Selects the database depending on TYPO3 version.
- Parameters
-
string | $databaseName | the name of the database to select |
t3lib_DB | $database | database object to process the change |
- Returns
- boolean
Tx_Phpunit_Database_TestCase::switchToTypo3Database |
( |
| ) |
|
|
protected |
Selects the TYPO3 database (again).
If you have selected any non-TYPO3 in your unit tests, you need to call this function in tearDown() in order to avoid problems with the following unit tests and the TYPO3 back-end.
- Returns
- void
The documentation for this class was generated from the following file:
- Classes/Database/TestCase.php