PHP Trait _generated\CodeGuyActions

Show file Open project: yupe/yupe

Public Methods

Method Description
canSeeInDatabase ( string $table, array $criteria = null ) [!] Method is generated. Documentation taken from corresponding module.
canSeeNumRecords ( integer $expectedNumber, string $table, array $criteria = null ) [!] Method is generated. Documentation taken from corresponding module.
cantSeeInDatabase ( string $table, array $criteria = null ) [!] Method is generated. Documentation taken from corresponding module.
createConsoleYiiApp ( ) [!] Method is generated. Documentation taken from corresponding module.
dontSeeInDatabase ( string $table, array $criteria = null ) [!] Method is generated. Documentation taken from corresponding module.
grabFromDatabase ( string $table, string $column, array $criteria = null ) : mixed [!] Method is generated. Documentation taken from corresponding module.
haveInDatabase ( string $table, array $data ) : integer [!] Method is generated. Documentation taken from corresponding module.
seeInDatabase ( string $table, array $criteria = null ) [!] Method is generated. Documentation taken from corresponding module.
seeNumRecords ( integer $expectedNumber, string $table, array $criteria = null ) [!] Method is generated. Documentation taken from corresponding module.
setDbConnectionOptionsFromYiiConfig ( $dbConfigFile ) [!] Method is generated. Documentation taken from corresponding module.
setDbDumpOptions ( array $dumpOptions ) [!] Method is generated. Documentation taken from corresponding module.

Protected Methods

Method Description
getScenario ( ) : Codeception\Scenario

Method Details

canSeeInDatabase() public method

Asserts that a row with the given column values exists. Provide table name and column values. php seeInDatabase('users', array('name' => 'Davert', 'email' => '[email protected]')); Fails if no such user found.
See also: Codeception\Module\Db::seeInDatabase()
public canSeeInDatabase ( string $table, array $criteria = null )
$table string
$criteria array Conditional Assertion: Test won't be stopped on fail

canSeeNumRecords() public method

Asserts that the given number of records were found in the database. php seeNumRecords(1, 'users', ['name' => 'davert']) ?>
See also: Codeception\Module\Db::seeNumRecords()
public canSeeNumRecords ( integer $expectedNumber, string $table, array $criteria = null )
$expectedNumber integer Expected number
$table string Table name
$criteria array Search criteria [Optional] Conditional Assertion: Test won't be stopped on fail

cantSeeInDatabase() public method

Effect is opposite to ->seeInDatabase Asserts that there is no record with the given column values in a database. Provide table name and column values. php dontSeeInDatabase('users', array('name' => 'Davert', 'email' => '[email protected]')); Fails if such user was found.
See also: Codeception\Module\Db::dontSeeInDatabase()
public cantSeeInDatabase ( string $table, array $criteria = null )
$table string
$criteria array Conditional Assertion: Test won't be stopped on fail

createConsoleYiiApp() public method

[!] Method is generated. Documentation taken from corresponding module.
See also: Codeception\Module\YiiHelper::createConsoleYiiApp()
public createConsoleYiiApp ( )

dontSeeInDatabase() public method

Effect is opposite to ->seeInDatabase Asserts that there is no record with the given column values in a database. Provide table name and column values. php dontSeeInDatabase('users', array('name' => 'Davert', 'email' => '[email protected]')); Fails if such user was found.
See also: Codeception\Module\Db::dontSeeInDatabase()
public dontSeeInDatabase ( string $table, array $criteria = null )
$table string
$criteria array

getScenario() abstract protected method

abstract protected getScenario ( ) : Codeception\Scenario
return Codeception\Scenario

grabFromDatabase() public method

Fetches a single column value from a database. Provide table name, desired column and criteria. php grabFromDatabase('users', 'email', array('name' => 'Davert'));
See also: Codeception\Module\Db::grabFromDatabase()
public grabFromDatabase ( string $table, string $column, array $criteria = null ) : mixed
$table string
$column string
$criteria array
return mixed

haveInDatabase() public method

Inserts an SQL record into a database. This record will be erased after the test. php haveInDatabase('users', array('name' => 'miles', 'email' => '[email protected]')); ?>
See also: Codeception\Module\Db::haveInDatabase()
public haveInDatabase ( string $table, array $data ) : integer
$table string
$data array
return integer $id

seeInDatabase() public method

Asserts that a row with the given column values exists. Provide table name and column values. php seeInDatabase('users', array('name' => 'Davert', 'email' => '[email protected]')); Fails if no such user found.
See also: Codeception\Module\Db::seeInDatabase()
public seeInDatabase ( string $table, array $criteria = null )
$table string
$criteria array

seeNumRecords() public method

Asserts that the given number of records were found in the database. php seeNumRecords(1, 'users', ['name' => 'davert']) ?>
See also: Codeception\Module\Db::seeNumRecords()
public seeNumRecords ( integer $expectedNumber, string $table, array $criteria = null )
$expectedNumber integer Expected number
$table string Table name
$criteria array Search criteria [Optional]

setDbConnectionOptionsFromYiiConfig() public method

Sets Db configuration file from Yii db.php or other file.
See also: Codeception\Module\YiiHelper::setDbConnectionOptionsFromYiiConfig()
public setDbConnectionOptionsFromYiiConfig ( $dbConfigFile )
$dbConfigFile string DataBase Configuration file

setDbDumpOptions() public method

Sets DataBase Dump file and its options For example: php setDbDumpOptions( array('dump'=>'tests/_data/mydump.sql','populate'=>true,'cleanup'=>false) ); ?>
See also: Codeception\Module\YiiHelper::setDbDumpOptions()
public setDbDumpOptions ( array $dumpOptions )
$dumpOptions array module config options