Tests: Add missing parent::setUp()
calls to all test classes.
Props johnbillion, birgire. Fixes #37375. git-svn-id: https://develop.svn.wordpress.org/trunk@44577 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
f73d8da051
commit
e547ecc791
@ -126,6 +126,7 @@ class Tests_Admin_includesScreen extends WP_UnitTestCase {
|
||||
|
||||
function setUp() {
|
||||
set_current_screen( 'front' );
|
||||
parent::setUp();
|
||||
}
|
||||
|
||||
function tearDown() {
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
abstract class WP_Filesystem_UnitTestCase extends WP_UnitTestCase {
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
add_filter( 'filesystem_method_file', array( $this, 'filter_abstraction_file' ) );
|
||||
add_filter( 'filesystem_method', array( $this, 'filter_fs_method' ) );
|
||||
WP_Filesystem();
|
||||
|
@ -7,6 +7,7 @@
|
||||
*/
|
||||
class Tests_Formatting_Redirect extends WP_UnitTestCase {
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
add_filter( 'home_url', array( $this, 'home_url' ) );
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,7 @@ abstract class WP_HTTP_UnitTestCase extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
|
||||
if ( is_callable( array( 'WP_Http', '_getTransport' ) ) ) {
|
||||
$this->markTestSkipped( 'The WP_Http tests require a class-http.php file of r17550 or later.' );
|
||||
|
@ -14,7 +14,7 @@ class Tests_Image_Editor extends WP_Image_UnitTestCase {
|
||||
/**
|
||||
* Setup test fixture
|
||||
*/
|
||||
public function setup() {
|
||||
public function setUp() {
|
||||
require_once( ABSPATH . WPINC . '/class-wp-image-editor.php' );
|
||||
|
||||
include_once( DIR_TESTDATA . '/../includes/mock-image-editor.php' );
|
||||
|
@ -11,6 +11,7 @@ class Tests_Locale extends WP_UnitTestCase {
|
||||
protected $locale;
|
||||
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->locale = new WP_Locale();
|
||||
}
|
||||
|
||||
|
@ -10,6 +10,7 @@ class Tests_WP_Embed extends WP_UnitTestCase {
|
||||
protected $wp_embed;
|
||||
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->wp_embed = new WP_Embed();
|
||||
}
|
||||
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
class Tests_POMO_PO extends WP_UnitTestCase {
|
||||
function setUp() {
|
||||
parent::setUp();
|
||||
require_once ABSPATH . '/wp-includes/pomo/po.php';
|
||||
// not so random wordpress.pot string -- multiple lines
|
||||
$this->mail = 'Your new WordPress blog has been successfully set up at:
|
||||
|
@ -11,6 +11,8 @@ class Tests_Rewrite_Tags extends WP_UnitTestCase {
|
||||
|
||||
public function setUp() {
|
||||
global $wp_rewrite;
|
||||
parent::setUp();
|
||||
|
||||
$this->wp_rewrite = $wp_rewrite;
|
||||
$wp_rewrite = new WP_Rewrite();
|
||||
$wp_rewrite->init();
|
||||
|
@ -5,6 +5,7 @@
|
||||
*/
|
||||
class Tests_Taxonomy_GetObjectTaxonomies extends WP_UnitTestCase {
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
register_post_type( 'wptests_pt' );
|
||||
register_taxonomy( 'wptests_tax', 'wptests_pt' );
|
||||
}
|
||||
|
@ -10,6 +10,7 @@ class Tests_WP extends WP_UnitTestCase {
|
||||
protected $wp;
|
||||
|
||||
public function setUp() {
|
||||
parent::setUp();
|
||||
$this->wp = new WP();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user