Changeset 9273 for trunk/tests/phpunit/testcases/xprofile/activity.php
- Timestamp:
- 12/24/2014 04:35:52 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/xprofile/activity.php
r9139 r9273 294 294 /** 295 295 * @group activity_action 296 * @group bp_xprofile_format_activity_action_new_member297 */298 public function test_bp_xprofile_format_activity_action_new_member_xprofile_on() {299 $active = bp_is_active( 'xprofile' );300 buddypress()->active_components['xprofile'] = '1';301 302 $u = $this->factory->user->create();303 $a = $this->factory->activity->create( array(304 'component' => buddypress()->profile->id,305 'type' => 'new_member',306 'user_id' => $u,307 ) );308 309 $expected = sprintf( __( '%s became a registered member', 'buddypress' ), bp_core_get_userlink( $u ) );310 311 $a_obj = new BP_Activity_Activity( $a );312 313 $this->assertSame( $expected, $a_obj->action );314 315 if ( ! $active ) {316 unset( buddypress()->active_components['xprofile'] );317 }318 }319 320 /**321 * @group activity_action322 * @group bp_xprofile_format_activity_action_new_member323 */324 public function test_bp_xprofile_format_activity_action_new_member_xprofile_off() {325 $active = bp_is_active( 'xprofile' );326 unset( buddypress()->active_components['xprofile'] );327 328 $u = $this->factory->user->create();329 $a = $this->factory->activity->create( array(330 'component' => buddypress()->profile->id,331 'type' => 'new_member',332 'user_id' => $u,333 ) );334 335 $expected = sprintf( __( '%s became a registered member', 'buddypress' ), bp_core_get_userlink( $u ) );336 337 $a_obj = new BP_Activity_Activity( $a );338 339 $this->assertSame( $expected, $a_obj->action );340 341 if ( $active ) {342 buddypress()->active_components['xprofile'] = '1';343 }344 }345 346 /**347 * @group activity_action348 296 * @group bp_xprofile_format_activity_action_updated_profile 349 297 */
Note: See TracChangeset
for help on using the changeset viewer.