UserFrosting API

DatabaseMigratorTest extends TestCase

Tests for the Migrator Class

Theses tests make sure the Migrator works correctly, without validating agaist a simulated database. Those tests are performed by DatabaseMigratorIntegrationTest

Tags
author

Louis Charette

Table of Contents

$schema Builder
$migrator Migrator
$locator MigrationLocator
$repository DatabaseMigrationRepository
$connection Connection
tearDown() void
setUp() Setup base mock and migrator instance. void
testMigratorUpWithNoMigrations() Basic test to make sure the base method syntaxt is ok mixed
testMigratorUpWithOnlyPendingMigrations() Basic test where all avaialble migrations are pending and fulfillable mixed
testMigratorUpWithOneInstalledMigrations() Test where one of the avaialble migrations is already installed mixed
testMigratorUpWithNoPendingMigrations() Test where all avaialble migrations have been ran mixed
testMigratorRollbackWithNoInstalledMigrations() Test rolling back where no migrations have been ran mixed
testMigratorRollbackAllInstalledMigrations() Test rolling back all installed migrations mixed
testMigratorRollbackAllInstalledMigrationsWithOneMissing() Test where one of the installed migration is not in the available migration classes mixed
testMigratorRollbackSpecific() Test a specific migration with no dependencies can be rollbacked mixed
testMigratorRollbackSpecificWithDependencies() Test a specific migration with some dependencies can be rollbacked mixed
testMigratorResetAllInstalledMigrations() Test where one of the installed migration is not in the available migration classes mixed

Properties

Methods

testMigratorUpWithNoMigrations()

Basic test to make sure the base method syntaxt is ok

public testMigratorUpWithNoMigrations( ) : mixed
Return values
mixed

testMigratorUpWithOnlyPendingMigrations()

Basic test where all avaialble migrations are pending and fulfillable

public testMigratorUpWithOnlyPendingMigrations( ) : mixed
Return values
mixed

testMigratorUpWithOneInstalledMigrations()

Test where one of the avaialble migrations is already installed

public testMigratorUpWithOneInstalledMigrations( ) : mixed
Return values
mixed

testMigratorUpWithNoPendingMigrations()

Test where all avaialble migrations have been ran

public testMigratorUpWithNoPendingMigrations( ) : mixed
Return values
mixed

testMigratorRollbackWithNoInstalledMigrations()

Test rolling back where no migrations have been ran

public testMigratorRollbackWithNoInstalledMigrations( ) : mixed
Return values
mixed

testMigratorRollbackAllInstalledMigrations()

Test rolling back all installed migrations

public testMigratorRollbackAllInstalledMigrations( ) : mixed
Return values
mixed

testMigratorRollbackAllInstalledMigrationsWithOneMissing()

Test where one of the installed migration is not in the available migration classes

public testMigratorRollbackAllInstalledMigrationsWithOneMissing( ) : mixed
Return values
mixed

testMigratorRollbackSpecific()

Test a specific migration with no dependencies can be rollbacked

public testMigratorRollbackSpecific( ) : mixed
Return values
mixed

testMigratorRollbackSpecificWithDependencies()

Test a specific migration with some dependencies can be rollbacked

public testMigratorRollbackSpecificWithDependencies( ) : mixed
Return values
mixed

testMigratorResetAllInstalledMigrations()

Test where one of the installed migration is not in the available migration classes

public testMigratorResetAllInstalledMigrations( ) : mixed
Return values
mixed

Search results