Tests: Use the new `wpdb::close()` method for closing the DB connection.

Props markoheijnen.

Fixes #34903.



git-svn-id: https://develop.svn.wordpress.org/trunk@36478 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Gary Pendergast 2016-02-05 01:05:47 +00:00
parent 6b49ad22ba
commit cdf27d383d
1 changed files with 1 additions and 6 deletions

View File

@ -60,12 +60,7 @@ class Tests_DB extends WP_UnitTestCase {
$var = $wpdb->get_var( "SELECT ID FROM $wpdb->users LIMIT 1" );
$this->assertGreaterThan( 0, $var );
if ( $wpdb->use_mysqli ) {
mysqli_close( $wpdb->dbh );
} else {
mysql_close( $wpdb->dbh );
}
unset( $wpdb->dbh );
$wpdb->close();
$var = $wpdb->get_var( "SELECT ID FROM $wpdb->users LIMIT 1" );
$this->assertGreaterThan( 0, $var );