Changeset 13437 for trunk/tests/phpunit/testcases/groups/activity.php
- Timestamp:
- 03/18/2023 09:42:31 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/groups/activity.php
r12395 r13437 25 25 $g_obj = groups_get_group( $g ); 26 26 27 $expected = sprintf( __( '%s created the group %s', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . bp_get_group_permalink( $g_obj) . '">' . $g_obj->name . '</a>' );27 $expected = sprintf( __( '%s created the group %s', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . esc_url( bp_get_group_url( $g_obj ) ) . '">' . $g_obj->name . '</a>' ); 28 28 29 29 $this->assertSame( $expected, $a_obj->action ); … … 47 47 $g_obj = groups_get_group( $g ); 48 48 49 $expected = sprintf( __( '%s joined the group %s', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . bp_get_group_permalink( $g_obj) . '">' . $g_obj->name . '</a>' );49 $expected = sprintf( __( '%s joined the group %s', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . esc_url( bp_get_group_url( $g_obj ) ) . '">' . $g_obj->name . '</a>' ); 50 50 51 51 $this->assertSame( $expected, $a_obj->action ); … … 124 124 $this->assertNotEmpty( $a['activities'] ); 125 125 126 $expected = sprintf( esc_html__( '%s changed the name of the group %s from "%s" to "%s"', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . bp_get_group_permalink( $group) . '">Foo</a>', $group->name, 'Foo' );126 $expected = sprintf( esc_html__( '%s changed the name of the group %s from "%s" to "%s"', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . esc_url( bp_get_group_url( $group ) ) . '">Foo</a>', $group->name, 'Foo' ); 127 127 $this->assertSame( $expected, $a['activities'][0]->action ); 128 128 … … 156 156 $this->assertNotEmpty( $a['activities'] ); 157 157 158 $expected = sprintf( esc_html__( '%s changed the description of the group %s from "%s" to "%s"', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . bp_get_group_permalink( $group) . '">' . $group->name . '</a>', $group->description, 'Bar' );158 $expected = sprintf( esc_html__( '%s changed the description of the group %s from "%s" to "%s"', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . esc_url( bp_get_group_url( $group ) ) . '">' . $group->name . '</a>', $group->description, 'Bar' ); 159 159 $this->assertSame( $expected, $a['activities'][0]->action ); 160 160 … … 189 189 $this->assertNotEmpty( $a['activities'] ); 190 190 191 $expected = sprintf( __( '%s changed the permalink of the group %s.', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . bp_get_group_permalink( $new_group_details) . '">' . $group->name . '</a>' );191 $expected = sprintf( __( '%s changed the permalink of the group %s.', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . esc_url( bp_get_group_url( $new_group_details ) ) . '">' . $group->name . '</a>' ); 192 192 $this->assertSame( $expected, $a['activities'][0]->action ); 193 193 … … 221 221 $this->assertNotEmpty( $a['activities'] ); 222 222 223 $expected = sprintf( __( '%s changed the name and description of the group %s', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . bp_get_group_permalink( $group) . '">Foo</a>' );223 $expected = sprintf( __( '%s changed the name and description of the group %s', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . esc_url( bp_get_group_url( $group ) ) . '">Foo</a>' ); 224 224 $this->assertSame( $expected, $a['activities'][0]->action ); 225 225 … … 244 244 $g_obj = groups_get_group( $g ); 245 245 246 $expected = sprintf( esc_html__( '%1$s posted an update in the group %2$s', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . esc_url( bp_get_group_ permalink( $g_obj ) ) . '">' . esc_html( $g_obj->name ) . '</a>' );246 $expected = sprintf( esc_html__( '%1$s posted an update in the group %2$s', 'buddypress' ), bp_core_get_userlink( $u ), '<a href="' . esc_url( bp_get_group_url( $g_obj ) ) . '">' . esc_html( $g_obj->name ) . '</a>' ); 247 247 248 248 $this->assertSame( $expected, $a_obj->action );
Note: See TracChangeset
for help on using the changeset viewer.