public function testMigrationClassNameInflected() { $tests = array('test-class-Name', 'test_class_name', 'TestClassName', 'test:class:name', 'test(class)name', 'test*class*name', 'test class name', 'test&class&name'); $builder = new Doctrine_Migration_Builder(); foreach ($tests as $test) { $code = $builder->generateMigrationClass($test); $this->assertTrue(strpos($code, 'TestClassName')); } }
/** * Generate new migration class skeleton * * @param string $className Name of the Migration class to generate * @param string $migrationsPath Path to directory which contains your migration classes */ public static function generateMigrationClass($className, $migrationsPath) { $builder = new Doctrine_Migration_Builder($migrationsPath); return $builder->generateMigrationClass($className); }