Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
11/03/2017 07:44:10 PM (8 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/groups/notifications.php

    r11278 r11737  
    1414        parent::setUp();
    1515        $this->current_user = get_current_user_id();
    16         $this->set_current_user( $this->factory->user->create() );
    17 
    18         $this->requesting_user_id = $this->factory->user->create();
    19         $this->group = $this->factory->group->create();
     16        $this->set_current_user( self::factory()->user->create() );
     17
     18        $this->requesting_user_id = self::factory()->user->create();
     19        $this->group = self::factory()->group->create();
    2020        $this->filter_fired = '';
    2121    }
     
    167167
    168168        // Admin
    169         $n = $this->factory->notification->create( array(
     169        $n = self::factory()->notification->create( array(
    170170            'component_name' => 'groups',
    171171            'user_id' => $u,
     
    191191
    192192        // Mod
    193         $n = $this->factory->notification->create( array(
     193        $n = self::factory()->notification->create( array(
    194194            'component_name' => 'groups',
    195195            'user_id' => $u,
     
    224224     */
    225225    public function test_membership_request_notifications_should_be_cleared_when_request_is_accepted() {
    226         $users = $this->factory->user->create_many( 3 );
     226        $users = self::factory()->user->create_many( 3 );
    227227
    228228        $this->add_user_to_group( $users[0], $this->group, array(
Note: See TracChangeset for help on using the changeset viewer.