mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +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:
@@ -454,7 +454,7 @@ class Tests_Post extends WP_UnitTestCase {
|
||||
public function test_pre_wp_unique_post_slug_filter() {
|
||||
add_filter( 'pre_wp_unique_post_slug', array( $this, 'filter_pre_wp_unique_post_slug' ), 10, 6 );
|
||||
|
||||
$post_id = $this->factory->post->create(
|
||||
$post_id = self::factory()->post->create(
|
||||
array(
|
||||
'title' => 'An example',
|
||||
'post_status' => 'publish',
|
||||
|
||||
Reference in New Issue
Block a user