Skip to content

Commit f7c912e

Browse files
committed
Tests: Reconnect the database helper after disconnect tests.
Reconnect the shared test helper alongside `$wpdb` so later field-processing tests have a working connection. Developed in: #16133 Props ekamran. See #66755. git-svn-id: https://develop.svn.wordpress.org/trunk@65730 602fd350-edb4-49c9-b593-d223f7449a82
1 parent a4a0272 commit f7c912e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎tests/phpunit/tests/db.php‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,6 +1485,7 @@ public function test_close() {
14851485
$this->assertTrue( $wpdb->close() );
14861486

14871487
$wpdb->check_connection();
1488+
self::$_wpdb->db_connect();
14881489
}
14891490

14901491
/**
@@ -1503,6 +1504,7 @@ public function test_charset_not_determined_when_disconnected() {
15031504
$this->assertSame( compact( 'charset', 'collate' ), $result );
15041505

15051506
$wpdb->check_connection();
1507+
self::$_wpdb->db_connect();
15061508
}
15071509

15081510
/**

0 commit comments

Comments
 (0)