Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
07/27/2024 04:30:23 PM (7 months ago)
Author:
espellcaste
Message:

Unit Tests: Conducted a thorough review of existing unit tests files and improved them to ensure robustness.

Props imath.

Closes https://github.com/buddypress/buddypress/pull/295
Fixes #9081

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/groups/functions/get-group.php

    r13335 r13980  
    3636     */
    3737    public function test_bp_get_group_with_id() {
    38         $g = $this->factory->group->create();
     38        $g = self::factory()->group->create();
    3939
    4040        $this->assertSame( $g, bp_get_group( $g )->id );
     
    4848    public function test_bp_get_group_with_slug() {
    4949        $slug = 'test-group';
    50         $g    = $this->factory->group->create( array( 'slug' => $slug ) );
     50        $g    = self::factory()->group->create( array( 'slug' => $slug ) );
    5151        $g1   = bp_get_group( $slug );
    5252
     
    6464     */
    6565    public function test_bp_get_group_with_object() {
    66         $g = $this->factory->group->create_and_get();
     66        $g = self::factory()->group->create_and_get();
    6767
    6868        $this->assertSame( $g->id, bp_get_group( $g )->id );
     
    7373     */
    7474    public function test_bp_get_group_from_groups_template() {
    75         $g = $this->factory->group->create( array( 'status' => 'private' ) );
     75        $g = self::factory()->group->create( array( 'status' => 'private' ) );
    7676
    7777        if ( bp_has_groups( array( 'include' => array( $g ) ) ) ) {
     
    9090    public function test_bp_get_group_from_current_group() {
    9191        $bp = buddypress();
    92         $g  = $this->factory->group->create_and_get( array( 'name' => 'foo' ) );
     92        $g  = self::factory()->group->create_and_get( array( 'name' => 'foo' ) );
    9393
    9494        // Set the current group.
Note: See TracChangeset for help on using the changeset viewer.