- Timestamp:
- 10/28/2019 07:53:27 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/class-bp-component.php
r12482 r12485 33 33 'BP_REST_Components_Endpoint', 34 34 'BP_REST_Members_Endpoint', 35 'BP_REST_Attachments_Member_Avatar_Endpoint', 35 36 ) ); 36 37 } … … 48 49 $this->assertSame( $bp->unit_test_rest->controllers, array( 49 50 'BP_REST_Components_Endpoint', 51 'BP_REST_Attachments_Member_Avatar_Endpoint', 50 52 ) ); 51 53 } … … 64 66 'BP_REST_Components_Endpoint', 65 67 'BP_REST_Members_Endpoint', 66 ) );67 }68 69 public function test_rest_api_init_for_xprofile_component() {70 $bp_xprofile = new BP_XProfile_Component();71 $bp = buddypress();72 73 $bp_xprofile->rest_api_init();74 75 $this->assertSame( $bp->unit_test_rest->controllers, array(76 'BP_REST_XProfile_Fields_Endpoint',77 'BP_REST_XProfile_Field_Groups_Endpoint',78 'BP_REST_XProfile_Data_Endpoint',79 68 'BP_REST_Attachments_Member_Avatar_Endpoint', 80 69 ) ); 81 70 } 82 83 public function test_rest_api_init_for_xprofile_component_without_avatar_enabled() {84 add_filter( 'bp_disable_avatar_uploads', '__return_true' );85 86 $bp_xprofile = new BP_XProfile_Component();87 $bp = buddypress();88 89 $bp_xprofile->rest_api_init();90 91 remove_filter( 'bp_disable_avatar_uploads', '__return_true' );92 93 $this->assertSame( $bp->unit_test_rest->controllers, array(94 'BP_REST_XProfile_Fields_Endpoint',95 'BP_REST_XProfile_Field_Groups_Endpoint',96 'BP_REST_XProfile_Data_Endpoint',97 ) );98 }99 71 }
Note: See TracChangeset
for help on using the changeset viewer.