public static function getNextFilename($table, $migration_type, $adapter = 'mysql') { global $_PATHS; $files = Pfw_Script_FileSystem::getFilesInDir($_PATHS['deltas']); $next_int = time(); $deltas_path = rtrim(rtrim($_PATHS['deltas'], '/'), "\\\\"); $ds = DIRECTORY_SEPARATOR; return "{$deltas_path}{$ds}{$next_int}-{$adapter}-{$table}_{$migration_type}.sql"; }
function testGetFilesInDir() { $this->testFileCopy(false); $files = Pfw_Script_FileSystem::getFilesInDir('/tmp/mypfwtestdir/recursive'); $this->assertEquals(array('/tmp/mypfwtestdir/recursive/text.txt'), $files); }