Changeset 8243
- Timestamp:
- 04/06/2014 04:20:31 PM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/bp-core/bp-core-avatars.php
r8160 r8243 1034 1034 1035 1035 $retval = false; 1036 if ( bp_core_fetch_avatar( array( 'item_id' => $user_id, 'no_grav' => true, 'html' => false ) ) != bp_core_avatar_default( ) )1036 if ( bp_core_fetch_avatar( array( 'item_id' => $user_id, 'no_grav' => true, 'html' => false ) ) != bp_core_avatar_default( 'local' ) ) 1037 1037 $retval = true; 1038 1038 -
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.