Changeset 59532 for trunk/tests/phpunit/tests/avatar.php
- Timestamp:
- 12/17/2024 11:56:28 PM (6 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/avatar.php
r58822 r59532 12 12 public function test_get_avatar_url_gravatar_url() { 13 13 $url = get_avatar_url( 1 ); 14 $this->assertSame( preg_match( '|^https?://secure.gravatar.com/avatar/[0-9a-f]{ 32}\?|', $url ), 1 );14 $this->assertSame( preg_match( '|^https?://secure.gravatar.com/avatar/[0-9a-f]{64}\?|', $url ), 1 ); 15 15 } 16 16 … … 91 91 $this->assertSame( $url, $url2 ); 92 92 93 $url2 = get_avatar_url( hash( 'sha256', WP_TESTS_EMAIL ) . '@sha256.gravatar.com' ); 94 $this->assertSame( $url, $url2 ); 95 93 96 $url2 = get_avatar_url( md5( WP_TESTS_EMAIL ) . '@md5.gravatar.com' ); 94 $this->assertSame( $url, $url2);97 $this->assertSame( preg_match( '|^https?://secure.gravatar.com/avatar/[0-9a-f]{32}\?|', $url2 ), 1 ); 95 98 96 99 $user = get_user_by( 'id', 1 ); … … 268 271 269 272 $this->assertTrue( is_avatar_comment_type( $comment_type ) ); 270 $this->assertMatchesRegularExpression( '|^https?://secure.gravatar.com/avatar/[0-9a-f]{ 32}\?|', $actual_data['url'] );273 $this->assertMatchesRegularExpression( '|^https?://secure.gravatar.com/avatar/[0-9a-f]{64}\?|', $actual_data['url'] ); 271 274 } 272 275
Note: See TracChangeset
for help on using the changeset viewer.