OnceRunMigration

Class OnceRunMigration TestCase with migration running.

author

Donii Sergii doniysa@gmail.com

package

Default

Methods

OnceRunMigration constructor.

__construct(object $app, array $seeds = array()) 
author

Donii Sergii doniysa@gmail.com

Arguments

$app

object

Application instance

$seeds

array

Seeds list

Find and boot class traits.

_boot() 
inherited
Throws
\ReflectionException

Find and un-boot traits.

_unBoot() 
inherited
author

Donii Sergii doniysa@gmail.com

Throws
\ReflectionException

Run migrations.

bootMigrationsTrait() 
inherited
Throws
\Exception

Check method exists in trait and call it.

checkTraits(string $prefix = '') 
inherited
author

Donii Sergii doniysa@gmail.com

Throws
\ReflectionException

Arguments

$prefix

string

Method name prefix

Get application.

getApp() : object
author

Donii Sergii doniysa@gmail.com

Response

object

Get console command directory.

getBinDir() : string
inherited
author

Donii Sergii doniysa@gmail.com

Response

string

Get console command name. By default is `console`.

getConsoleCommand() : string
inherited
author

Donii Sergii doniysa@gmail.com

Response

string

Get migration command name. By default is `migrations:migrate --no-interaction`.

getMigrationCommand() : string
inherited
author

Donii Sergii doniysa@gmail.com

Response

string

Fetch migrations list for rollback.

getMigrationsList() : boolean|array
inherited
author

Donii Sergii doniysa@gmail.com

Response

boolean|array

Get migration table. By default is `migration_versions`.

getMigrationTable() : string
inherited
author

Donii Sergii doniysa@gmail.com

Response

string

Get php executor.

getPhpExecutor() : string
inherited
author

Donii Sergii doniysa@gmail.com

Response

string

Get command which will be running before. By default is `'export APP_ENV=testing'`.

getPreCommand() : string
inherited
author

Donii Sergii doniysa@gmail.com

Response

string

Get rollback migration command name. By default is `migrations:execute --down --no-interaction`.

getRollbackMigrationCommand() : string
inherited
author

Donii Sergii doniysa@gmail.com

Response

string

Get seed class repeat ending name (will be concatenated with origin name).

getSeedClassEnding() : null|string
inherited
author

Donii Sergii doniysa@gmail.com

Response

null|string

Get seed command. By default is `seed:run --class=` from package `sonrac/symfony-seed-command`.

getSeedCommand() : string
inherited
author

Donii Sergii doniysa@gmail.com

Response

string

Get seeds classes namespace.

getSeedNamespace() : null|string
inherited
author

Donii Sergii doniysa@gmail.com

Response

null|string

Get seeds.

getSeeds() : array
inherited
author

Donii Sergii doniysa@gmail.com

Response

array

Check flag continue on command execute failure status.

isContinueOnFailure() : boolean
inherited
author

Donii Sergii doniysa@gmail.com

Response

boolean

Rollback all migrations.

rollback() : null|false
inherited
author

Donii Sergii doniysa@gmail.com

Throws
\Exception

Response

null|false

Run command.

runCommand(string $command) 
inherited
Throws
\Exception

Arguments

$command

string

Run migrations.

runMigration() 
inherited
author

Donii Sergii doniysa@gmail.com

Throws
\Exception

Run seed.

runSeed(string $seed) 
inherited
author

Donii Sergii doniysa@gmail.com

Throws
\Exception

Arguments

$seed

string

Run seeds.

runSeeds() 
inherited
author

Donii Sergii doniysa@gmail.com

Throws
\Exception

Set application.

setApp(\Silex\Application $app) : \sonrac\FCoverage\OnceRunMigration
author

Donii Sergii doniysa@gmail.com

Arguments

$app

\Silex\Application

Response

\sonrac\FCoverage\OnceRunMigration

Set console command directory.

setBinDir(string $binDir) : $this
inherited
author

Donii Sergii doniysa@gmail.com

Arguments

$binDir

string

Response

$this

Set console command name. By default is `console`.

setConsoleCommand(string $consoleCommand) : \sonrac\FCoverage\MigrationsTrait
inherited
author

Donii Sergii doniysa@gmail.com

Arguments

$consoleCommand

string

Response

\sonrac\FCoverage\MigrationsTrait

Set flag continue on command execute failure status.

setContinueOnFailure(boolean $continueOnFailure) : \sonrac\FCoverage\MigrationsTrait
inherited
author

Donii Sergii doniysa@gmail.com

Arguments

$continueOnFailure

boolean

Response

\sonrac\FCoverage\MigrationsTrait

Set migration command name. By default is `migrations:migrate --no-interaction`.

setMigrationCommand(string $migrationCommand) : \sonrac\FCoverage\MigrationsTrait
inherited
author

Donii Sergii doniysa@gmail.com

Arguments

$migrationCommand

string

Response

\sonrac\FCoverage\MigrationsTrait

Set migration table. By default is `migration_versions`.

setMigrationTable(string $migrationTable) : \sonrac\FCoverage\MigrationsTrait
inherited
author

Donii Sergii doniysa@gmail.com

Arguments

$migrationTable

string

Response

\sonrac\FCoverage\MigrationsTrait

Set php executor.

setPhpExecutor(string $phpExecutor) : $this
inherited
author

Donii Sergii doniysa@gmail.com

Arguments

$phpExecutor

string

Response

$this

Set command which will be running before. By default is `'export APP_ENV=testing'`.

setPreCommand(string $preCommand) : \sonrac\FCoverage\MigrationsTrait
inherited
author

Donii Sergii doniysa@gmail.com

Arguments

$preCommand

string

Response

\sonrac\FCoverage\MigrationsTrait

Set rollback migration command name. By default is `migrations:execute --down --no-interaction`.

setRollbackMigrationCommand(string $rollbackMigrationCommand) : \sonrac\FCoverage\MigrationsTrait
inherited
author

Donii Sergii doniysa@gmail.com

Arguments

$rollbackMigrationCommand

string

Response

\sonrac\FCoverage\MigrationsTrait

Set seed class repeat ending name (will be concatenated with origin name).

setSeedClassEnding(null|string $seedClassEnding) : \sonrac\FCoverage\MigrationsTrait
inherited
author

Donii Sergii doniysa@gmail.com

Arguments

$seedClassEnding

null|string

Response

\sonrac\FCoverage\MigrationsTrait

Set seed command. By default is `seed:run --class=` from package `sonrac/symfony-seed-command`.

setSeedCommand(string $seedCommand) : \sonrac\FCoverage\MigrationsTrait
inherited
author

Donii Sergii doniysa@gmail.com

Arguments

$seedCommand

string

Response

\sonrac\FCoverage\MigrationsTrait

Set seed classes namespace.

setSeedNamespace(null|string $seedNamespace) : \sonrac\FCoverage\MigrationsTrait
inherited
author

Donii Sergii doniysa@gmail.com

Arguments

$seedNamespace

null|string

Response

\sonrac\FCoverage\MigrationsTrait

setSeeds

setSeeds(array $seeds) : \sonrac\FCoverage\OnceRunMigration
author

Donii Sergii doniysa@gmail.com

Arguments

$seeds

array

Response

\sonrac\FCoverage\OnceRunMigration

Properties

Seeds list.

seeds : array
static
var
author

Donii Sergii doniysa@gmail.com

Type(s)

array

Application instance.

app : object
var
author

Donii Sergii doniysa@gmail.com

Type(s)

object

Path to console command dir.

binDir : string
inherited
var
author

Donii Sergii doniysa@gmail.com

Type(s)

string

Php executor name.

phpExecutor : string
inherited
var
author

Donii Sergii doniysa@gmail.com

Type(s)

string

Console command name.

consoleCommand : string
inherited
var
author

Donii Sergii doniysa@gmail.com

Type(s)

string

Seed classes namespace.

seedNamespace : null|string
inherited
var
author

Donii Sergii doniysa@gmail.com

Type(s)

null|string

Seed class ending name.

seedClassEnding : string|null
inherited
var
author

Donii Sergii doniysa@gmail.com

Type(s)

string|null

Migration table name.

migrationTable : string
inherited
var
author

Donii Sergii doniysa@gmail.com

Type(s)

string

Migration command name.

migrationCommand : string
inherited
var
author

Donii Sergii doniysa@gmail.com

Type(s)

string

Rollback migration command name.

rollbackMigrationCommand : string
inherited
var
author

Donii Sergii doniysa@gmail.com

Type(s)

string

Command which will be running before. By default is `'export APP_ENV=testing'`.

preCommand : string
inherited
var
author

Donii Sergii doniysa@gmail.com

Type(s)

string

If true will be continue on command execute failure status.

continueOnFailure : boolean
inherited
var
author

Donii Sergii doniysa@gmail.com

Type(s)

boolean

Seed command. By default is `seed:run --class=` from package `sonrac/symfony-seed-command`.

seedCommand : string
inherited
var
author

Donii Sergii doniysa@gmail.com

Type(s)

string