public function testMigrateUp() { $m = new Pluf_Migration(); $m->dry_run = true; $this->assertEquals(true, $m->migrate(5)); }
if (!is_null($what['version'])) { $v_disp = $what['version']; } if ($what['app']) { $app = trim($what['app']); $app_disp = $app; } $m = new Pluf_Migration($app); if ($debug) { $m->display = true; } $m->dry_run = $what['dry_run']; if ($what['install']) { debug('Install ' . $app_disp); $m->install(); } elseif ($what['un-install']) { debug('Uninstall ' . $app_disp); $m->unInstall(); } elseif ($what['backup']) { debug('Backup ' . $app_disp); if (!isset($args[1])) { $args[1] = null; } $m->backup($args[0], $args[1]); } elseif ($what['restore']) { debug('Restore ' . $app_disp); $m->restore($args[0], $args[1]); } else { debug('Migrate ' . $app . ' to version ' . $v_disp); $m->migrate($what['version']); }