2017 © Pedro Peláez
 

library laravel-codeception-dbdump

Create database dumps ready to be used with Codeception

image

antennaio/laravel-codeception-dbdump

Create database dumps ready to be used with Codeception

  • Thursday, August 25, 2016
  • by antennaio
  • Repository
  • 1 Watchers
  • 8 Stars
  • 1,451 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

Laravel Codeception DbDump

Create database dumps ready to be used with Codeception, (*1)

Codeception comes with a nice Db module that keeps the test database clean before each test is run. To use it you are expected to put a database dump in tests/_data directory. This is a major pain, because each time the database changes, a new dump is required. This package adds a single command to your project that will migrate, seed and dump a test database making it ready to be used in Codeception tests., (*2)

Installation

Install through composer:, (*3)

composer require antennaio/laravel-codeception-dbdump:~0.0.1

Add the service provider to config:, (*4)

// config/app.php
'provider' => [
    ...
    Antennaio\Codeception\DbDumpServiceProvider::class,
    ...
];

Usage

Run the command with a single argument connection, which is one of the connections defined in config/database.php., (*5)

php artisan codeception:dbdump connection

Optionally, you can specify a path to the dump file:, (*6)

php artisan codeception:dbdump connection --dump=tests/_data/test.sql

All available options:, (*7)

Option Description
--dump[=DUMP] Choose the path for your dump file [default: "tests/_data/dump.sql"]
--empty-database Delete all database tables before any other action
--no-seeding Disable seeding in the dump process
--seeder-class[=SEEDER-CLASS] Choose the seeder class [default: "DatabaseSeeder"]
--binary[=BINARY] Specify the path to mysqldump (if using mysql driver) or sqlite3 (if using sqlite driver)

Run the command whenever your tests run

It's possible to have this command run automatically before any of your tests are executed by adding it to tests/_bootstrap.php:, (*8)

exec('php artisan codeception:dbdump connection');

Compatibility

The codeception:dbdump command is currently compatible with MySQL and SQLite drivers., (*9)

The Versions

25/08 2016

dev-master

9999999-dev https://github.com/antennaio/laravel-codeception-dbdump

Create database dumps ready to be used with Codeception

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kazik

database laravel testing php mysql sqlite dump codeception

02/05 2016

v0.0.5

0.0.5.0 https://github.com/antennaio/laravel-codeception-dbdump

Create database dumps ready to be used with Codeception

  Sources   Download

MIT

The Requires

 

The Development Requires

by Kazik

database laravel testing php mysql sqlite dump codeception

01/05 2016

v0.0.4

0.0.4.0 https://github.com/antennaio/laravel-codeception-dbdump

Create database dumps ready to be used with Codeception

  Sources   Download

MIT

The Requires

 

by Kazik

database laravel testing php mysql sqlite dump codeception

29/04 2016

v0.0.3

0.0.3.0 https://github.com/antennaio/laravel-codeception-dbdump

Create database dumps ready to be used with Codeception

  Sources   Download

MIT

The Requires

 

by Kazik

database laravel testing php mysql sqlite dump codeception

03/03 2016

v0.0.2

0.0.2.0 https://github.com/antennaio/laravel-codeception-dbdump

Create database dumps ready to be used with Codeception

  Sources   Download

MIT

The Requires

 

by Kazik

database laravel testing php mysql sqlite dump codeception

03/03 2016

v0.0.1

0.0.1.0 https://github.com/antennaio/laravel-codeception-dbdump

Create database dumps ready to be used with Codeception

  Sources   Download

MIT

The Requires

 

by Kazik

database laravel testing php mysql sqlite dump codeception