public function rollbackMigrations() { $phpmig = new PhpmigApplication($this->container, $this->output); $phpmig_adapter = $this->container->getPhpmigAdapter(); if (!$phpmig_adapter->hasSchema()) { $phpmig_adapter->createSchema(); } $phpmig->down(0); }
/** * @covers ::down */ public function testDown() { $adapter = $this->getAdapter(array($this->prev_version, $this->current_version)); $migrations = $this->getMigrations(); $this->createTestMigrations($migrations); $container = $this->getContainer($adapter, $migrations, $this->getTempDir()); $container['phpmig.migrator'] = $this->getMigrator($adapter, $container, $this->output, 0, 1); $app = new PhpmigApplication($container, $this->output); $app->down($this->prev_version); }