Skip to content

Commit cc0c584

Browse files
committed
converted to message param
1 parent 8e155fd commit cc0c584

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

tests/phpunit/tests/user.php

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2175,21 +2175,16 @@ private function is_sequential( array $arr ) {
21752175
*/
21762176
public function test_user_roles_property_is_sequential_array() {
21772177
$user = new WP_User( self::$author_id );
2178-
// Initial roles array should be sequential.
2179-
$this->assertTrue( $this->is_sequential( $user->roles ) );
2178+
$this->assertTrue( $this->is_sequential( $user->roles ), 'Initial roles array should be sequential' );
21802179

21812180
$user->remove_role( 'author' );
2182-
// After removing all roles, $user->roles should still be an array.
2183-
$this->assertIsArray( $user->roles );
2184-
// After removing all roles, $user->roles should be an empty array.
2185-
$this->assertSame( array(), $user->roles );
2181+
$this->assertIsArray( $user->roles, 'After removing all roles, $user->roles should still be an array' );
2182+
$this->assertSame( array(), $user->roles, 'After removing all roles, $user->roles should be an empty array' );
21862183

21872184
$user->add_role( 'author' );
21882185
$user->add_role( 'subscriber' );
2189-
// After adding multiple roles, $user->roles should contains added roles.
2190-
$this->assertSame( array( 'author', 'subscriber' ), $user->roles );
2191-
// After adding multiple roles, $user->roles should still be sequential.
2192-
$this->assertTrue( $this->is_sequential( $user->roles ) );
2186+
$this->assertSame( array( 'author', 'subscriber' ), $user->roles, 'After adding multiple roles, $user->roles should contains added roles' );
2187+
$this->assertTrue( $this->is_sequential( $user->roles ), 'After adding multiple roles, $user->roles should still be sequential' );
21932188
}
21942189

21952190
/**

0 commit comments

Comments
 (0)