For some reason tableExists() is being unreliable, which is resulting in tables not...
authorX! <soxred93@users.mediawiki.org>
Fri, 31 Dec 2010 21:51:21 +0000 (21:51 +0000)
committerX! <soxred93@users.mediawiki.org>
Fri, 31 Dec 2010 21:51:21 +0000 (21:51 +0000)
tests/phpunit/MediaWikiTestCase.php

index 8998e2c..8e30fff 100644 (file)
@@ -144,9 +144,10 @@ abstract class MediaWikiTestCase extends PHPUnit_Framework_TestCase {
                }
                
                foreach ( $tables as $table ) {
-                       if( $this->db->tableExists( "`$table`" ) ) {
+                       try {
                                $sql = $this->db->getType() == 'oracle' ? "DROP TABLE $table DROP CONSTRAINTS" : "DROP TABLE `$table`";
                                $this->db->query( $sql, __METHOD__ );
+                       } catch( Exception $e ) {
                        }
                }