. */ /** * Doctrine_Migration_TestCase * * @package Doctrine * @author Konsta Vesterinen * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @category Object Relational Mapping * @link www.phpdoctrine.com * @since 1.0 * @version $Revision$ */ class Doctrine_Migration_TestCase extends Doctrine_UnitTestCase { public function testMigration() { // Upgrade one at a time $migration = new Doctrine_Migration('migration_classes'); $migration->migrate(0, 1); $migration->migrate(1, 2); // Then revert back to version 1 $migration->migrate(2, 1); $migration->migrate(1, 0); // Check to make sure the current version is 0 $this->assertEqual($migration->getCurrentVersion(), 0); } }