Make WordPress Core


Ignore:
Timestamp:
10/22/2015 04:37:31 PM (9 years ago)
Author:
wonderboymusic
Message:

oEmbed: if SimpleXMLElement does not exist, return an HTTP Error 501 Not implemented response.

Props swissspidy.
Fixes #34274.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/oembed/controller.php

    r35242 r35354  
    165165        $legacy_controller = new WP_oEmbed_Controller();
    166166
    167         $this->assertEquals( 'Not implemented',  $legacy_controller->xml_response( null ) );
    168         $this->assertEquals( 'Not implemented',  $legacy_controller->xml_response( 123 ) );
    169         $this->assertEquals( 'Not implemented',  $legacy_controller->xml_response( array() ) );
     167        $this->assertEquals( get_status_header_desc( 501 ),  $legacy_controller->xml_response( null ) );
     168        $this->assertEquals( get_status_header_desc( 501 ),  $legacy_controller->xml_response( 123 ) );
     169        $this->assertEquals( get_status_header_desc( 501 ),  $legacy_controller->xml_response( array() ) );
    170170    }
    171171
Note: See TracChangeset for help on using the changeset viewer.