Changeset 44573 for trunk/tests/phpunit/tests/avatar.php
- Timestamp:
- 01/12/2019 06:05:55 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/avatar.php
r44499 r44573 104 104 } 105 105 106 protected $fake URL;106 protected $fake_url; 107 107 /** 108 108 * @ticket 21195 109 109 */ 110 110 public function test_pre_get_avatar_url_filter() { 111 $this->fake URL= 'haha wat';111 $this->fake_url = 'haha wat'; 112 112 113 113 add_filter( 'pre_get_avatar_data', array( $this, 'pre_get_avatar_url_filter' ), 10, 1 ); … … 115 115 remove_filter( 'pre_get_avatar_data', array( $this, 'pre_get_avatar_url_filter' ), 10 ); 116 116 117 $this->assertEquals( $url, $this->fake URL);117 $this->assertEquals( $url, $this->fake_url ); 118 118 } 119 119 public function pre_get_avatar_url_filter( $args ) { 120 $args['url'] = $this->fake URL;120 $args['url'] = $this->fake_url; 121 121 return $args; 122 122 } … … 126 126 */ 127 127 public function test_get_avatar_url_filter() { 128 $this->fake URL= 'omg lol';128 $this->fake_url = 'omg lol'; 129 129 130 130 add_filter( 'get_avatar_url', array( $this, 'get_avatar_url_filter' ), 10, 1 ); … … 132 132 remove_filter( 'get_avatar_url', array( $this, 'get_avatar_url_filter' ), 10 ); 133 133 134 $this->assertEquals( $url, $this->fake URL);134 $this->assertEquals( $url, $this->fake_url ); 135 135 } 136 136 public function get_avatar_url_filter( $url ) { 137 return $this->fake URL;137 return $this->fake_url; 138 138 } 139 139 … … 208 208 209 209 210 protected $fake IMG;210 protected $fake_img; 211 211 /** 212 212 * @ticket 21195 213 213 */ 214 214 public function test_pre_get_avatar_filter() { 215 $this->fake IMG= 'YOU TOO?!';215 $this->fake_img = 'YOU TOO?!'; 216 216 217 217 add_filter( 'pre_get_avatar', array( $this, 'pre_get_avatar_filter' ), 10, 1 ); … … 219 219 remove_filter( 'pre_get_avatar', array( $this, 'pre_get_avatar_filter' ), 10 ); 220 220 221 $this->assertEquals( $img, $this->fake IMG);221 $this->assertEquals( $img, $this->fake_img ); 222 222 } 223 223 public function pre_get_avatar_filter( $img ) { 224 return $this->fake IMG;224 return $this->fake_img; 225 225 } 226 226 … … 229 229 */ 230 230 public function test_get_avatar_filter() { 231 $this->fake URL= 'YA RLY';231 $this->fake_url = 'YA RLY'; 232 232 233 233 add_filter( 'get_avatar', array( $this, 'get_avatar_filter' ), 10, 1 ); … … 235 235 remove_filter( 'get_avatar', array( $this, 'get_avatar_filter' ), 10 ); 236 236 237 $this->assertEquals( $img, $this->fake URL);237 $this->assertEquals( $img, $this->fake_url ); 238 238 } 239 239 public function get_avatar_filter( $img ) { 240 return $this->fake URL;240 return $this->fake_url; 241 241 } 242 242
Note: See TracChangeset
for help on using the changeset viewer.