WordPress.org

Make WordPress Core

Changeset 47485


Ignore:
Timestamp:
03/22/2020 02:05:28 PM (5 months ago)
Author:
SergeyBiryukov
Message:

Embeds: Remove the external oEmbed tests for YouTube.

These tests no longer test anything that WordPress core has control over. YouTube now serves everything
over HTTPS by default, so the tests for #23149 will always pass, and the tests for #32714 aren't testing
anything that core has control over.

Tests for the responses from oEmbed providers has been attempted and reverted in #32360.

Props johnbillion.
Merges [41712] to the 4.2 branch.
See #42076, #32714, #23149.

Location:
branches/4.2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/4.2

  • branches/4.2/tests/phpunit/tests/media.php

    r39714 r47485  
    113113        $this->assertTrue( wp_oembed_remove_provider( 'http://foo.bar/*' ) );
    114114        $this->assertFalse( wp_oembed_remove_provider( 'http://foo.bar/*' ) );
    115     }
    116 
    117     /**
    118      * Test secure youtube.com embeds
    119      *
    120      * @ticket 23149
    121      */
    122     function test_youtube_com_secure_embed() {
    123         global $wp_embed;
    124 
    125         $out = wp_oembed_get( 'http://www.youtube.com/watch?v=oHg5SJYRHA0' );
    126         $this->assertContains( 'https://www.youtube.com/embed/oHg5SJYRHA0?feature=oembed', $out );
    127 
    128         $out = wp_oembed_get( 'https://www.youtube.com/watch?v=oHg5SJYRHA0' );
    129         $this->assertContains( 'https://www.youtube.com/embed/oHg5SJYRHA0?feature=oembed', $out );
    130 
    131         $out = wp_oembed_get( 'https://youtu.be/zHjMoNQN7s0' );
    132         $this->assertContains( 'https://www.youtube.com/embed/zHjMoNQN7s0?feature=oembed', $out );
    133115    }
    134116
Note: See TracChangeset for help on using the changeset viewer.