WordPress.org

Make WordPress Core

Ticket #22329: 22329-test_get_avatar_fix.diff

File 22329-test_get_avatar_fix.diff, 621 bytes (added by jipmoors, 6 years ago)

Fixes failing unittest because of added 'srcset' parameter on img tag

  • tests/phpunit/tests/avatar.php

     
    158158
    159159        public function test_get_avatar() {
    160160                $img = get_avatar( 1 );
    161                 $this->assertEquals( preg_match( "|^<img alt='[^']*' src='[^']*' class='[^']*' height='[^']*' width='[^']*' />$|", $img ), 1 );
     161                $this->assertEquals( preg_match( "|^<img alt='[^']*' src='[^']*' srcset='[^']*' class='[^']*' height='[^']*' width='[^']*' />$|", $img ), 1 );
    162162        }
    163163
    164164        public function test_get_avatar_size() {