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
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
$schema
protected
Builder
$schema
$migrator
protected
Migrator
$migrator
$locator
protected
MigrationLocator
$locator
$repository
protected
DatabaseMigrationRepository
$repository
$connection
protected
Connection
$connection
Methods
tearDown()
public
tearDown(
)
: void
setUp()
Setup base mock and migrator instance.
public
setUp(
)
: void
testMigratorUpWithNoMigrations()
Basic test to make sure the base method syntaxt is ok
public
testMigratorUpWithNoMigrations(
)
: mixed
Return values
mixedtestMigratorUpWithOnlyPendingMigrations()
Basic test where all avaialble migrations are pending and fulfillable
public
testMigratorUpWithOnlyPendingMigrations(
)
: mixed
Return values
mixedtestMigratorUpWithOneInstalledMigrations()
Test where one of the avaialble migrations is already installed
public
testMigratorUpWithOneInstalledMigrations(
)
: mixed
Return values
mixedtestMigratorUpWithNoPendingMigrations()
Test where all avaialble migrations have been ran
public
testMigratorUpWithNoPendingMigrations(
)
: mixed
Return values
mixedtestMigratorRollbackWithNoInstalledMigrations()
Test rolling back where no migrations have been ran
public
testMigratorRollbackWithNoInstalledMigrations(
)
: mixed
Return values
mixedtestMigratorRollbackAllInstalledMigrations()
Test rolling back all installed migrations
public
testMigratorRollbackAllInstalledMigrations(
)
: mixed
Return values
mixedtestMigratorRollbackAllInstalledMigrationsWithOneMissing()
Test where one of the installed migration is not in the available migration classes
public
testMigratorRollbackAllInstalledMigrationsWithOneMissing(
)
: mixed
Return values
mixedtestMigratorRollbackSpecific()
Test a specific migration with no dependencies can be rollbacked
public
testMigratorRollbackSpecific(
)
: mixed
Return values
mixedtestMigratorRollbackSpecificWithDependencies()
Test a specific migration with some dependencies can be rollbacked
public
testMigratorRollbackSpecificWithDependencies(
)
: mixed
Return values
mixedtestMigratorResetAllInstalledMigrations()
Test where one of the installed migration is not in the available migration classes
public
testMigratorResetAllInstalledMigrations(
)
: mixed