db = ezcDbInstance::get(); } catch ( Exception $e ) { $this->markTestSkipped( "No Database connection available" ); } if ( $this->db->getName() !== 'mysql' ) { $this->markTestSkipped( "We are not testing with MySQL" ); } if ( !( $this->db instanceof ezcDbHandlerMysql ) ) { $this->markTestSkipped(); } $this->testFilesDir = dirname( __FILE__ ) . '/testfiles/'; $this->tempDir = $this->createTempDir( 'ezcDatabaseMySqlTest' ); $tables = $this->db->query( "SHOW TABLES" )->fetchAll(); array_walk( $tables, create_function( '&$item,$key', '$item = $item[0];' ) ); foreach ( $tables as $tableName ) { $this->db->query( "DROP TABLE `$tableName`" ); } } public static function suite() { return new PHPUnit_Framework_TestSuite( 'ezcDatabaseSchemaMySqlTest' ); } } ?>