PHP Class Phalcon\Test\ModelTestCase

Inheritance: extends UnitTestCase
Afficher le fichier Open project: phalcon/incubator Class Usage Examples

Méthodes publiques

Méthode Description
emptyTable ( string $table ) : boolean Empties a table in the database.
populateTable ( string $table, null $records = null ) Populates a table with default data
truncateTable ( string $table ) : boolean Disables FOREIGN_KEY_CHECKS and truncates database table

Méthodes protégées

Méthode Description
setDb ( string $dbType = 'mysql' ) : void Sets the database adapter in the DI container
setUp ( ) This method is called before a test is executed.

Method Details

emptyTable() public méthode

Empties a table in the database.
public emptyTable ( string $table ) : boolean
$table string
Résultat boolean

populateTable() public méthode

Populates a table with default data
public populateTable ( string $table, null $records = null )
$table string
$records null

setDb() protected méthode

Sets the database adapter in the DI container
protected setDb ( string $dbType = 'mysql' ) : void
$dbType string Sets the database type for the test
Résultat void

setUp() protected méthode

This method is called before a test is executed.
protected setUp ( )

truncateTable() public méthode

Disables FOREIGN_KEY_CHECKS and truncates database table
public truncateTable ( string $table ) : boolean
$table string table name
Résultat boolean result of truncate operation