mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-20 11:14:28 +00:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user