WordPress.org

Make WordPress Core

Changeset 36694


Ignore:
Timestamp:
02/24/2016 09:20:41 PM (3 years ago)
Author:
DrewAPicture
Message:

Embeds: Update embed template paths and messages in tests, missed in [36693].

Props ocean90
See #34561.

File:
1 edited

Legend:

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

    r35762 r36694  
    2121
    2222        ob_start();
    23         include( ABSPATH . WPINC . '/embed-template.php' );
    24         $actual = ob_get_clean();
    25 
    26         $doc = new DOMDocument();
    27         $this->assertTrue( $doc->loadHTML( $actual ) );
    28         $this->assertTrue( false === strpos( $actual, 'Page not found' ) );
     23        include( ABSPATH . WPINC . '/theme-compat/embed.php' );
     24        $actual = ob_get_clean();
     25
     26        $doc = new DOMDocument();
     27        $this->assertTrue( $doc->loadHTML( $actual ) );
     28        $this->assertTrue( false === strpos( $actual, 'That embed can’t be found.' ) );
    2929        $this->assertTrue( false !== strpos( $actual, 'Hello World' ) );
    3030    }
     
    4747
    4848        ob_start();
    49         include( ABSPATH . WPINC . '/embed-template.php' );
    50         $actual = ob_get_clean();
    51 
    52         $doc = new DOMDocument();
    53         $this->assertTrue( $doc->loadHTML( $actual ) );
    54         $this->assertFalse( strpos( $actual, 'Page not found' ) );
     49        include( ABSPATH . WPINC . '/theme-compat/embed.php' );
     50        $actual = ob_get_clean();
     51
     52        $doc = new DOMDocument();
     53        $this->assertTrue( $doc->loadHTML( $actual ) );
     54        $this->assertFalse( strpos( $actual, 'That embed can’t be found.' ) );
    5555        $this->assertTrue( false !== strpos( $actual, 'Hello World' ) );
    5656        $this->assertTrue( false !== strpos( $actual, 'canola.jpg' ) );
     
    6464
    6565        ob_start();
    66         include( ABSPATH . WPINC . '/embed-template.php' );
    67         $actual = ob_get_clean();
    68 
    69         $doc = new DOMDocument();
    70         $this->assertTrue( $doc->loadHTML( $actual ) );
    71         $this->assertTrue( false !== strpos( $actual, 'Page not found' ) );
     66        include( ABSPATH . WPINC . '/theme-compat/embed.php' );
     67        $actual = ob_get_clean();
     68
     69        $doc = new DOMDocument();
     70        $this->assertTrue( $doc->loadHTML( $actual ) );
     71        $this->assertTrue( false !== strpos( $actual, 'That embed can’t be found.' ) );
    7272    }
    7373
     
    8787
    8888        ob_start();
    89         include( ABSPATH . WPINC . '/embed-template.php' );
    90         $actual = ob_get_clean();
    91 
    92         $doc = new DOMDocument();
    93         $this->assertTrue( $doc->loadHTML( $actual ) );
    94         $this->assertFalse( strpos( $actual, 'Page not found' ) );
     89        include( ABSPATH . WPINC . '/theme-compat/embed.php' );
     90        $actual = ob_get_clean();
     91
     92        $doc = new DOMDocument();
     93        $this->assertTrue( $doc->loadHTML( $actual ) );
     94        $this->assertFalse( strpos( $actual, 'That embed can’t be found.' ) );
    9595        $this->assertTrue( false !== strpos( $actual, 'Hello World' ) );
    9696        $this->assertTrue( false !== strpos( $actual, 'canola.jpg' ) );
     
    110110
    111111        ob_start();
    112         include( ABSPATH . WPINC . '/embed-template.php' );
    113         $actual = ob_get_clean();
    114 
    115         $doc = new DOMDocument();
    116         $this->assertTrue( $doc->loadHTML( $actual ) );
    117         $this->assertTrue( false !== strpos( $actual, 'Page not found' ) );
     112        include( ABSPATH . WPINC . '/theme-compat/embed.php' );
     113        $actual = ob_get_clean();
     114
     115        $doc = new DOMDocument();
     116        $this->assertTrue( $doc->loadHTML( $actual ) );
     117        $this->assertTrue( false !== strpos( $actual, 'That embed can’t be found.' ) );
    118118    }
    119119
     
    132132
    133133        ob_start();
    134         include( ABSPATH . WPINC . '/embed-template.php' );
    135         $actual = ob_get_clean();
    136 
    137         $doc = new DOMDocument();
    138         $this->assertTrue( $doc->loadHTML( $actual ) );
    139         $this->assertTrue( false !== strpos( $actual, 'Page not found' ) );
     134        include( ABSPATH . WPINC . '/theme-compat/embed.php' );
     135        $actual = ob_get_clean();
     136
     137        $doc = new DOMDocument();
     138        $this->assertTrue( $doc->loadHTML( $actual ) );
     139        $this->assertTrue( false !== strpos( $actual, 'That embed can’t be found.' ) );
    140140    }
    141141
     
    153153
    154154        ob_start();
    155         include( ABSPATH . WPINC . '/embed-template.php' );
    156         $actual = ob_get_clean();
    157 
    158         $doc = new DOMDocument();
    159         $this->assertTrue( $doc->loadHTML( $actual ) );
    160         $this->assertTrue( false !== strpos( $actual, 'Page not found' ) );
     155        include( ABSPATH . WPINC . '/theme-compat/embed.php' );
     156        $actual = ob_get_clean();
     157
     158        $doc = new DOMDocument();
     159        $this->assertTrue( $doc->loadHTML( $actual ) );
     160        $this->assertTrue( false !== strpos( $actual, 'That embed can’t be found.' ) );
    161161    }
    162162
     
    178178
    179179        ob_start();
    180         include( ABSPATH . WPINC . '/embed-template.php' );
    181         $actual = ob_get_clean();
    182 
    183         $doc = new DOMDocument();
    184         $this->assertTrue( $doc->loadHTML( $actual ) );
    185         $this->assertTrue( false === strpos( $actual, 'Page not found' ) );
     180        include( ABSPATH . WPINC . '/theme-compat/embed.php' );
     181        $actual = ob_get_clean();
     182
     183        $doc = new DOMDocument();
     184        $this->assertTrue( $doc->loadHTML( $actual ) );
     185        $this->assertTrue( false === strpos( $actual, 'That embed can’t be found.' ) );
    186186        $this->assertTrue( false !== strpos( $actual, 'Hello World' ) );
    187187    }
Note: See TracChangeset for help on using the changeset viewer.