Property | Type | Description | |
---|---|---|---|
$connection | Doctrine\DBAL\Connection | Doctrine Database connection -- to not be constructed twice for one test. | |
$db | string | Name of the DB, extracted from DSN. | |
$dsn | string | DSN used for the DB backend. | |
$handler | eZ\Publish\Core\Persistence\Database\DatabaseHandler | Database handler -- to not be constructed twice for one test. | |
$initial | Property which holds the state if this is the initial test run, so that we should set up the database, or if this is any of the following test runs, where it is sufficient to reset the database. |
Method | Description | |
---|---|---|
assertQueryResult ( array $expectation, eZ\Publish\Core\Persistence\Database\SelectQuery $query, string $message = null ) | Assert query result as correct. | |
getDatabaseConnection ( ) : Doctrine\DBAL\Connection | Get native Doctrine database connection. | |
getDatabaseHandler ( ) : |
Get a eZ Doctrine database connection handler. | |
resetSequences ( ) | Reset DB sequences. | |
setUp ( ) | Resets the database on test setup, so we always operate on a clean database. |
Method | Description | |
---|---|---|
assertPropertiesCorrect ( array $properties, object $object ) | Asserts correct property values on $object. | |
assertStructsEqual ( object $expStruct, object $actStruct, array $propertyNames = null ) | Asserts $expStruct equals $actStruct in at least $propertyNames. | |
getDsn ( ) : string | Get data source name. | |
getInstallationDir ( ) : string | ||
getPublicPropertyNames ( object $object ) : array | Returns public property names in $object. | |
getResultTextRepresentation ( array $result ) : string | Get a text representation of a result set. | |
insertDatabaseFixture ( string $file ) | Inserts database fixture from $file. | |
tearDown ( ) |
protected assertPropertiesCorrect ( array $properties, object $object ) | ||
$properties | array | |
$object | object |
public static assertQueryResult ( array $expectation, eZ\Publish\Core\Persistence\Database\SelectQuery $query, string $message = null ) | ||
$expectation | array | |
$query | eZ\Publish\Core\Persistence\Database\SelectQuery | |
$message | string |
public getDatabaseConnection ( ) : Doctrine\DBAL\Connection | ||
return | Doctrine\DBAL\Connection |
public getDatabaseHandler ( ) : |
||
return |
protected static getInstallationDir ( ) : string | ||
return | string |
protected getPublicPropertyNames ( object $object ) : array | ||
$object | object | |
return | array |
protected static getResultTextRepresentation ( array $result ) : string | ||
$result | array | |
return | string |
protected insertDatabaseFixture ( string $file ) | ||
$file | string |
public setUp ( ) |
protected Connection,Doctrine\DBAL $connection | ||
return | Doctrine\DBAL\Connection |
protected DatabaseHandler,eZ\Publish\Core\Persistence\Database $handler | ||
return | eZ\Publish\Core\Persistence\Database\DatabaseHandler |