Changeset 8243 for trunk/tests/testcases/core/avatars.php
- Timestamp:
- 04/06/2014 04:20:31 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/testcases/core/avatars.php
r8108 r8243 54 54 $this->go_to( '/' ); 55 55 } 56 57 /** 58 * @group bp_get_user_has_avatar 59 */ 60 public function test_bp_get_user_has_avatar_no_avatar_uploaded() { 61 $u = $this->create_user(); 62 $this->assertFalse( bp_get_user_has_avatar( $u ) ); 63 } 64 65 /** 66 * @group bp_get_user_has_avatar 67 */ 68 public function test_bp_get_user_has_avatar_has_avatar_uploaded() { 69 $u = $this->create_user(); 70 71 // Fake it 72 add_filter( 'bp_core_fetch_avatar_url', array( $this, 'avatar_cb' ) ); 73 74 $this->assertTrue( bp_get_user_has_avatar( $u ) ); 75 76 remove_filter( 'bp_core_fetch_avatar_url', array( $this, 'avatar_cb' ) ); 77 } 78 79 public function avatar_cb() { 80 return 'foo'; 81 } 56 82 }
Note: See TracChangeset
for help on using the changeset viewer.