summaryrefslogtreecommitdiffstatshomepage
path: root/tests/phpunit/includes/testcase-ajax.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/phpunit/includes/testcase-ajax.php')
-rw-r--r--tests/phpunit/includes/testcase-ajax.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/phpunit/includes/testcase-ajax.php b/tests/phpunit/includes/testcase-ajax.php
index 6296ced04b..3227fa6460 100644
--- a/tests/phpunit/includes/testcase-ajax.php
+++ b/tests/phpunit/includes/testcase-ajax.php
@@ -75,7 +75,7 @@ abstract class WP_Ajax_UnitTestCase extends WP_UnitTestCase {
error_reporting( $this->_error_level & ~E_WARNING );
// Make some posts
- self::$factory->post->create_many( 5 );
+ self::factory()->post->create_many( 5 );
}
/**
@@ -148,7 +148,7 @@ abstract class WP_Ajax_UnitTestCase extends WP_UnitTestCase {
*/
protected function _setRole( $role ) {
$post = $_POST;
- $user_id = self::$factory->user->create( array( 'role' => $role ) );
+ $user_id = self::factory()->user->create( array( 'role' => $role ) );
wp_set_current_user( $user_id );
$_POST = array_merge($_POST, $post);
}