Skip to content

Commit e547ecc

Browse files
committed
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
1 parent f73d8da commit e547ecc

11 files changed

Lines changed: 12 additions & 1 deletion

File tree

tests/phpunit/tests/admin/includesScreen.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ class Tests_Admin_includesScreen extends WP_UnitTestCase {
126126

127127
function setUp() {
128128
set_current_screen( 'front' );
129+
parent::setUp();
129130
}
130131

131132
function tearDown() {

tests/phpunit/tests/filesystem/base.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
abstract class WP_Filesystem_UnitTestCase extends WP_UnitTestCase {
77
function setUp() {
8+
parent::setUp();
89
add_filter( 'filesystem_method_file', array( $this, 'filter_abstraction_file' ) );
910
add_filter( 'filesystem_method', array( $this, 'filter_fs_method' ) );
1011
WP_Filesystem();

tests/phpunit/tests/formatting/redirect.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
*/
88
class Tests_Formatting_Redirect extends WP_UnitTestCase {
99
function setUp() {
10+
parent::setUp();
1011
add_filter( 'home_url', array( $this, 'home_url' ) );
1112
}
1213

tests/phpunit/tests/http/base.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ function skipTestOnTimeout( $response ) {
3939
}
4040

4141
function setUp() {
42+
parent::setUp();
4243

4344
if ( is_callable( array( 'WP_Http', '_getTransport' ) ) ) {
4445
$this->markTestSkipped( 'The WP_Http tests require a class-http.php file of r17550 or later.' );

tests/phpunit/tests/image/editor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class Tests_Image_Editor extends WP_Image_UnitTestCase {
1414
/**
1515
* Setup test fixture
1616
*/
17-
public function setup() {
17+
public function setUp() {
1818
require_once( ABSPATH . WPINC . '/class-wp-image-editor.php' );
1919

2020
include_once( DIR_TESTDATA . '/../includes/mock-image-editor.php' );

tests/phpunit/tests/locale.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ class Tests_Locale extends WP_UnitTestCase {
1111
protected $locale;
1212

1313
public function setUp() {
14+
parent::setUp();
1415
$this->locale = new WP_Locale();
1516
}
1617

tests/phpunit/tests/oembed/WpEmbed.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ class Tests_WP_Embed extends WP_UnitTestCase {
1010
protected $wp_embed;
1111

1212
public function setUp() {
13+
parent::setUp();
1314
$this->wp_embed = new WP_Embed();
1415
}
1516

tests/phpunit/tests/pomo/po.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
class Tests_POMO_PO extends WP_UnitTestCase {
77
function setUp() {
8+
parent::setUp();
89
require_once ABSPATH . '/wp-includes/pomo/po.php';
910
// not so random wordpress.pot string -- multiple lines
1011
$this->mail = 'Your new WordPress blog has been successfully set up at:

tests/phpunit/tests/rewrite/rewriteTags.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class Tests_Rewrite_Tags extends WP_UnitTestCase {
1111

1212
public function setUp() {
1313
global $wp_rewrite;
14+
parent::setUp();
15+
1416
$this->wp_rewrite = $wp_rewrite;
1517
$wp_rewrite = new WP_Rewrite();
1618
$wp_rewrite->init();

tests/phpunit/tests/taxonomy/getObjectTaxonomies.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66
class Tests_Taxonomy_GetObjectTaxonomies extends WP_UnitTestCase {
77
public function setUp() {
8+
parent::setUp();
89
register_post_type( 'wptests_pt' );
910
register_taxonomy( 'wptests_tax', 'wptests_pt' );
1011
}

0 commit comments

Comments
 (0)