Skip to:
Content

BuddyPress.org

Changeset 13120


Ignore:
Timestamp:
10/08/2021 08:37:03 PM (5 years ago)
Author:
imath
Message:

Use the assertContains method instead of assertEquals for a unit test

Since r13117 it the BP_Tests_BP_Signup::test_get_with_include test is failing due to right values being randomly sorted. Checking the included values are contained into the results seems a safer way to run this test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/members/class-bp-signup.php

    r13116 r13120  
    259259                ) );
    260260
    261                 $this->assertEquals( array( $s1, $s3 ), $ss['signups'] );
     261                $this->assertContains( $s1, $ss['signups'] );
     262                $this->assertContains( $s3, $ss['signups'] );
    262263        }
    263264
Note: See TracChangeset for help on using the changeset viewer.