Skip to content

ianckc/Codeception-DbHelper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Codeception-DbHelper

A Codeception helper to run SQL queries during tests

Add the DbHelper.php file to tests/_helpers

In the .yml file for your chosen suite, e.g. tests/acceptance.suite.yml, under the modules add Db and DbHelper. See the example file included.

Add the database configuration to codeception.yml. See the example file included.

Create a directory in tests/_data that will hold all SQL files that you would like to run.

Create as many .sql files as you like within this directory.

To run the helper form within a test use

$I->runSQLQueries('my_directory');

The helper scans the directory for any files ending in .sql and runs them.

About

A Codeception helper to run SQL queries during tests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages