mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-11-02 21:00:40 +00:00
Tests: Use the factory method instead of the property.
This replaces all references to the `WP_UnitTestCase_Base::$factory` property with static function calls to the `WP_UnitTestCase_Base::factory()` method. This is a consistency improvement for the test suite. Follow up to [35225], [35242], [49603], [54087], [54088]. Props jrf. See #55652. git-svn-id: https://develop.svn.wordpress.org/trunk@54090 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -681,13 +681,13 @@ class Tests_Taxonomy extends WP_UnitTestCase {
|
||||
'publicly_queryable' => false,
|
||||
)
|
||||
);
|
||||
$t = $this->factory->term->create_and_get(
|
||||
$t = self::factory()->term->create_and_get(
|
||||
array(
|
||||
'taxonomy' => 'wptests_tax',
|
||||
)
|
||||
);
|
||||
|
||||
$p = $this->factory->post->create();
|
||||
$p = self::factory()->post->create();
|
||||
wp_set_object_terms( $p, $t->slug, 'wptests_tax' );
|
||||
|
||||
add_filter( 'do_parse_request', array( $this, 'register_query_var' ) );
|
||||
|
||||
Reference in New Issue
Block a user