mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 12:50:28 +00:00
Ensure that wpdb_exposed_methods_for_testing is available to all tests.
It should be defined in a common library file so that all tests have access to it, even when run in isolation. See [30345], #21212. git-svn-id: https://develop.svn.wordpress.org/trunk@30528 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -923,20 +923,3 @@ class Tests_DB extends WP_UnitTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Special class for exposing protected wpdb methods we need to access
|
||||
*/
|
||||
class wpdb_exposed_methods_for_testing extends wpdb {
|
||||
public function __construct() {
|
||||
global $wpdb;
|
||||
$this->dbh = $wpdb->dbh;
|
||||
$this->use_mysqli = $wpdb->use_mysqli;
|
||||
$this->ready = true;
|
||||
$this->field_types = $wpdb->field_types;
|
||||
$this->charset = $wpdb->charset;
|
||||
}
|
||||
|
||||
public function __call( $name, $arguments ) {
|
||||
return call_user_func_array( array( $this, $name ), $arguments );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user