Changeset 48937 for trunk/tests/phpunit/tests/oembed/filterResult.php
- Timestamp:
- 09/02/2020 12:35:36 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/oembed/filterResult.php
r47947 r48937 10 10 $actual = wp_filter_oembed_result( $html, (object) array( 'type' => 'rich' ), 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' ); 11 11 12 $this->assert Equals( $html, $actual );12 $this->assertSame( $html, $actual ); 13 13 } 14 14 … … 22 22 $this->assertTrue( isset( $matches[1] ) ); 23 23 $this->assertTrue( isset( $matches[2] ) ); 24 $this->assert Equals( $matches[1], $matches[2] );24 $this->assertSame( $matches[1], $matches[2] ); 25 25 } 26 26 … … 29 29 $actual = wp_filter_oembed_result( $html, (object) array( 'type' => 'rich' ), '' ); 30 30 31 $this->assert Equals( '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"></iframe>', $actual );31 $this->assertSame( '<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->assert Equals( '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"></iframe>', $actual );44 $this->assertSame( '<iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"></iframe>', $actual ); 45 45 } 46 46 … … 66 66 $this->assertTrue( isset( $matches[1] ) ); 67 67 $this->assertTrue( isset( $matches[2] ) ); 68 $this->assert Equals( $matches[1], $matches[2] );68 $this->assertSame( $matches[1], $matches[2] ); 69 69 } 70 70 … … 72 72 $actual = wp_filter_oembed_result( 'some string', (object) array( 'type' => 'link' ), '' ); 73 73 74 $this->assert Equals( 'some string', $actual );74 $this->assertSame( 'some string', $actual ); 75 75 } 76 76 … … 84 84 $actual = wp_filter_oembed_result( $html, (object) array( 'type' => 'rich' ), '' ); 85 85 86 $this->assert Equals( '<blockquote class="wp-embedded-content"></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);"></iframe>', $actual );86 $this->assertSame( '<blockquote class="wp-embedded-content"></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);"></iframe>', $actual ); 87 87 } 88 88 … … 91 91 $actual = wp_filter_oembed_result( $html, (object) array( 'type' => 'rich' ), '' ); 92 92 93 $this->assert Equals( '<blockquote class="wp-embedded-content"><a href=""></a></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);"></iframe>', $actual );93 $this->assertSame( '<blockquote class="wp-embedded-content"><a href=""></a></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" style="position: absolute; clip: rect(1px, 1px, 1px, 1px);"></iframe>', $actual ); 94 94 } 95 95 … … 125 125 ); 126 126 $actual = _wp_oembed_get_object()->data2html( $data, 'https://untrusted.localhost' ); 127 $this->assert Equals( $expected, $actual );127 $this->assertSame( $expected, $actual ); 128 128 } 129 129 … … 135 135 $actual = _oembed_filter_feed_content( wp_filter_oembed_result( $html, (object) array( 'type' => 'rich' ), '' ) ); 136 136 137 $this->assert Equals( '<blockquote class="wp-embedded-content"></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"></iframe>', $actual );137 $this->assertSame( '<blockquote class="wp-embedded-content"></blockquote><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted"></iframe>', $actual ); 138 138 } 139 139 }
Note: See TracChangeset
for help on using the changeset viewer.