Make WordPress Core

Changeset 49117


Ignore:
Timestamp:
10/10/2020 01:37:18 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Tests: Update third-party video URLs in unit tests with more permanent videos.

This brings some consistency to the YouTube and Vimeo URLs used for tests:

  • For YouTube, use the video of WordPress 5.0 release.
  • For Vimeo, use one of the official test videos.

Props garrett-eclipse, dd32.
Fixes #51487. See #meta5467.

Location:
trunk/tests/phpunit/tests
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/customize/manager.php

    r49108 r49117  
    36143614        $this->manager->register_controls();
    36153615        $setting   = $this->manager->get_setting( 'external_header_video' );
    3616         $video_url = 'https://www.youtube.com/watch?v=KiS8rZBeIO0';
     3616        $video_url = 'https://www.youtube.com/watch?v=72xdCU__XCk';
    36173617
    36183618        $whitespaces = array(
  • trunk/tests/phpunit/tests/formatting/MakeClickable.php

    r48937 r49117  
    290290            "http://trunk.domain/testing#something
    291291            (<img src='http://trunk.domain/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'>)",
    292             "<span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/nd_BdvG43rE&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' /> <param name='allowfullscreen' value='true' /> <param name='wmode' value='opaque' /> <embed src='http://www.youtube.com/v/nd_BdvG43rE&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='opaque'></embed> </object></span>",
     292            "<span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='https://www.youtube.com/watch?v=72xdCU__XCk&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' /> <param name='allowfullscreen' value='true' /> <param name='wmode' value='opaque' /> <embed src='https://www.youtube.com/watch?v=72xdCU__XCk&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='opaque'></embed> </object></span>",
    293293            '<a href="http://example.com/example.gif" title="Image from http://example.com">Look at this image!</a>',
    294294        );
     
    299299            "<a href=\"http://trunk.domain/testing#something\" rel=\"nofollow\">http://trunk.domain/testing#something</a>
    300300            (<img src='http://trunk.domain/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley'>)",
    301             "<span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/nd_BdvG43rE&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' /> <param name='allowfullscreen' value='true' /> <param name='wmode' value='opaque' /> <embed src='http://www.youtube.com/v/nd_BdvG43rE&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='opaque'></embed> </object></span>",
     301            "<span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='https://www.youtube.com/watch?v=72xdCU__XCk&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' /> <param name='allowfullscreen' value='true' /> <param name='wmode' value='opaque' /> <embed src='https://www.youtube.com/watch?v=72xdCU__XCk&rel=1&fs=1&showsearch=0&showinfo=1&iv_load_policy=1' type='application/x-shockwave-flash' allowfullscreen='true' width='425' height='350' wmode='opaque'></embed> </object></span>",
    302302            '<a href="http://example.com/example.gif" title="Image from http://example.com">Look at this image!</a>',
    303303        );
  • trunk/tests/phpunit/tests/media.php

    r49085 r49117  
    935935        $actual = wp_video_shortcode(
    936936            array(
    937                 'src' => 'https://www.youtube.com/watch?v=i_cVJgIz_Cs&feature=youtu.be',
     937                'src' => 'https://www.youtube.com/watch?v=72xdCU__XCk&feature=youtu.be',
    938938            )
    939939        );
     
    949949        $actual = wp_video_shortcode(
    950950            array(
    951                 'src' => 'http://www.youtube.com/watch?v=i_cVJgIz_Cs',
    952             )
    953         );
    954 
    955         $this->assertContains( 'src="https://www.youtube.com/watch?v=i_cVJgIz_Cs', $actual );
     951                'src' => 'http://www.youtube.com/watch?v=72xdCU__XCk',
     952            )
     953        );
     954
     955        $this->assertContains( 'src="https://www.youtube.com/watch?v=72xdCU__XCk', $actual );
    956956    }
    957957
     
    963963        $actual = wp_video_shortcode(
    964964            array(
    965                 'src' => 'http://vimeo.com/190372437?blah=meh',
    966             )
    967         );
    968 
    969         $this->assertContains( 'src="https://vimeo.com/190372437', $actual );
     965                'src' => 'http://vimeo.com/76979871?blah=meh',
     966            )
     967        );
     968
     969        $this->assertContains( 'src="https://vimeo.com/76979871', $actual );
    970970        $this->assertNotContains( 'blah=meh', $actual );
    971971    }
     
    978978        $actual = wp_video_shortcode(
    979979            array(
    980                 'src' => 'http://vimeo.com/190372437',
    981             )
    982         );
    983 
    984         $this->assertContains( 'src="https://vimeo.com/190372437?loop=0', $actual );
     980                'src' => 'http://vimeo.com/76979871',
     981            )
     982        );
     983
     984        $this->assertContains( 'src="https://vimeo.com/76979871?loop=0', $actual );
    985985    }
    986986
     
    992992        $actual = wp_video_shortcode(
    993993            array(
    994                 'src'  => 'http://vimeo.com/190372437',
     994                'src'  => 'http://vimeo.com/76979871',
    995995                'loop' => true,
    996996            )
    997997        );
    998998
    999         $this->assertContains( 'src="https://vimeo.com/190372437?loop=1', $actual );
     999        $this->assertContains( 'src="https://vimeo.com/76979871?loop=1', $actual );
    10001000    }
    10011001
  • trunk/tests/phpunit/tests/oembed/filterResult.php

    r48937 r49117  
    88        $html = '<p></p><iframe onload="alert(1)"></iframe>';
    99
    10         $actual = wp_filter_oembed_result( $html, (object) array( 'type' => 'rich' ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' );
     10        $actual = wp_filter_oembed_result( $html, (object) array( 'type' => 'rich' ), 'https://www.youtube.com/watch?v=72xdCU__XCk' );
    1111
    1212        $this->assertSame( $html, $actual );
  • trunk/tests/phpunit/tests/oembed/filterTitleAttributes.php

    r44942 r49117  
    1212                    'type' => 'rich',
    1313                ),
    14                 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
     14                'https://www.youtube.com/watch?v=72xdCU__XCk',
    1515                '<p>Foo</p><iframe src=""></iframe><b>Bar</b>',
    1616            ),
     
    2020                    'type' => 'rich',
    2121                ),
    22                 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
     22                'https://www.youtube.com/watch?v=72xdCU__XCk',
    2323                '<p>Foo</p><iframe title="Hello World" src=""></iframe><b>Bar</b>',
    2424            ),
     
    2929                    'title' => 'Hello World',
    3030                ),
    31                 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
     31                'https://www.youtube.com/watch?v=72xdCU__XCk',
    3232                '<p>Foo</p>',
    3333            ),
     
    3838                    'title' => 'Hello World',
    3939                ),
    40                 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
     40                'https://www.youtube.com/watch?v=72xdCU__XCk',
    4141                '<p title="Foo">Bar</p>',
    4242            ),
     
    4747                    'title' => 'Hello World',
    4848                ),
    49                 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
     49                'https://www.youtube.com/watch?v=72xdCU__XCk',
    5050                '<p>Foo</p><iframe title="Hello World" src=""></iframe><b>Bar</b>',
    5151            ),
     
    5656                    'title' => 'Bar',
    5757                ),
    58                 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
     58                'https://www.youtube.com/watch?v=72xdCU__XCk',
    5959                '<iframe title="Foo" src=""></iframe>',
    6060            ),
     
    8080                'title' => 'Bar',
    8181            ),
    82             'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
     82            'https://www.youtube.com/watch?v=72xdCU__XCk'
    8383        );
    8484
     
    9797                'title' => 'Bar',
    9898            ),
    99             'https://www.youtube.com/watch?v=dQw4w9WgXcQ'
     99            'https://www.youtube.com/watch?v=72xdCU__XCk'
    100100        );
    101101
  • trunk/tests/phpunit/tests/shortcode.php

    r48937 r49117  
    214214
    215215    function test_positional_atts_url() {
    216         $out = do_shortcode( '[test-shortcode-tag http://www.youtube.com/watch?v=eBGIQ7ZuuiU]' );
     216        $out = do_shortcode( '[test-shortcode-tag https://www.youtube.com/watch?v=72xdCU__XCk]' );
    217217        $this->assertSame( '', $out );
    218         $this->assertSame( array( 0 => 'http://www.youtube.com/watch?v=eBGIQ7ZuuiU' ), $this->atts );
     218        $this->assertSame( array( 0 => 'https://www.youtube.com/watch?v=72xdCU__XCk' ), $this->atts );
    219219        $this->assertSame( 'test-shortcode-tag', $this->tagname );
    220220    }
  • trunk/tests/phpunit/tests/widgets/media-video-widget.php

    r48939 r49117  
    287287                'attachment_id' => null,
    288288                'loop'          => false,
    289                 'url'           => 'https://www.youtube.com/watch?v=OQSNhk5ICTI',
     289                'url'           => 'https://www.youtube.com/watch?v=72xdCU__XCk',
    290290                'content'       => $content,
    291291            )
     
    295295        // Custom attributes.
    296296        $this->assertContains( 'preload="metadata"', $output );
    297         $this->assertContains( 'src="https://www.youtube.com/watch?v=OQSNhk5ICTI', $output );
     297        $this->assertContains( 'src="https://www.youtube.com/watch?v=72xdCU__XCk', $output );
    298298        $this->assertContains( $content, $output );
    299299    }
Note: See TracChangeset for help on using the changeset viewer.