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:
parent
6b49ad22ba
commit
cdf27d383d
@ -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 );
|
||||
|
Loading…
Reference in New Issue
Block a user