Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/03/2017 07:44:10 PM (4 years ago)
Author:
boonebgorges
Message:

Use static factory method throughout PHPUnit tests.

See #7620.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/core/template/bpUserHasAccess.php

    r9989 r11737  
    66class BP_Tests_Core_Template_BpUserHasAccess extends BP_UnitTestCase {
    77    public function test_should_return_true_for_bp_moderate_user() {
    8         $users = $this->factory->user->create_many( 2 );
     8        $users = self::factory()->user->create_many( 2 );
    99
    1010        $this->grant_bp_moderate( $users[0] );
     
    1717
    1818    public function test_should_return_false_on_anothers_profile_for_user_without_bp_moderate() {
    19         $users = $this->factory->user->create_many( 2 );
     19        $users = self::factory()->user->create_many( 2 );
    2020
    2121        $this->set_current_user( $users[0] );
     
    2727
    2828    public function test_should_return_true_on_own_profile() {
    29         $users = $this->factory->user->create_many( 2 );
     29        $users = self::factory()->user->create_many( 2 );
    3030
    3131        $this->set_current_user( $users[0] );
Note: See TracChangeset for help on using the changeset viewer.