Changeset 35577 for trunk/tests/phpunit/tests/oembed/filterResult.php
- Timestamp:
- 11/09/2015 12:07:03 AM (10 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/oembed/filterResult.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/oembed/filterResult.php
r35437 r35577 29 29 $actual = wp_filter_oembed_result( $html, (object) array( 'type' => 'rich' ), '' ); 30 30 31 $this->assertEquals( '<iframe sandbox="allow-scripts" security="restricted"></iframe>', $actual );31 $this->assertEquals( '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"></iframe>', $actual ); 32 32 } 33 33 … … 42 42 $actual = wp_filter_oembed_result( $html, (object) array( 'type' => 'rich' ), '' ); 43 43 44 $this->assertEquals( '<iframe sandbox="allow-scripts" security="restricted"></iframe>', $actual );44 $this->assertEquals( '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"></iframe>', $actual ); 45 45 } 46 46 … … 84 84 $actual = wp_filter_oembed_result( $html, (object) array( 'type' => 'rich' ), '' ); 85 85 86 $this->assertEquals( '<blockquote ></blockquote><iframesandbox="allow-scripts" security="restricted" style="display:none;"></iframe>', $actual );86 $this->assertEquals( '<blockquote class="wp-embedded-content"></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="display:none;"></iframe>', $actual ); 87 87 } 88 88 89 89 function test_filter_oembed_result_allowed_html() { 90 $html = '<blockquote ><strong><a href="" target=""></a></strong></blockquote><iframe></iframe>';90 $html = '<blockquote class="foo" id="bar"><strong><a href="" target=""></a></strong></blockquote><iframe></iframe>'; 91 91 $actual = wp_filter_oembed_result( $html, (object) array( 'type' => 'rich' ), '' ); 92 92 93 $this->assertEquals( '<blockquote><a href=""></a></blockquote><iframe sandbox="allow-scripts" security="restricted" style="display:none;"></iframe>', $actual ); 93 $this->assertEquals( '<blockquote class="wp-embedded-content"><a href=""></a></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="display:none;"></iframe>', $actual ); 94 } 95 96 /** 97 * @group feed 98 */ 99 function test_filter_feed_content() { 100 $html = '<blockquote></blockquote><iframe></iframe>'; 101 $actual = _oembed_filter_feed_content( wp_filter_oembed_result( $html, (object) array( 'type' => 'rich' ), '' ) ); 102 103 $this->assertEquals( '<blockquote class="wp-embedded-content"></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"></iframe>', $actual ); 94 104 } 95 105 }
Note: See TracChangeset
for help on using the changeset viewer.