From cdf27d383d778970d54dc833e3b845bccc6eba5e Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Fri, 5 Feb 2016 01:05:47 +0000 Subject: [PATCH] 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 --- tests/phpunit/tests/db.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/tests/phpunit/tests/db.php b/tests/phpunit/tests/db.php index e74ca308d2..583dba1d22 100644 --- a/tests/phpunit/tests/db.php +++ b/tests/phpunit/tests/db.php @@ -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 );