test
another div';
+ $after = 'blah
';
+ $shortcode = wpcom_shortcodereverse_getty( $before . self::GETTY_EMBED . $after );
+ $expected = $before . self::GETTY_SHORTCODE . $after;
+ $this->assertEquals( $expected, $shortcode );
+ }
+
+ function test_getty_add_oembed_endpoint_caller_non_getty() {
+ $provider_url = apply_filters(
+ 'oembed_fetch_url',
+ 'https://www.youtube.com/oembed?maxwidth=471&maxheight=594&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ',
+ 'https://www.youtube.com/watch?v=dQw4w9WgXcQ',
+ ''
+ );
+
+ $this->assertEquals(
+ $provider_url,
+ 'https://www.youtube.com/oembed?maxwidth=471&maxheight=594&url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DdQw4w9WgXcQ'
+ );
}
/**
@@ -31,13 +123,11 @@ public function test_shortcodes_getty() {
* @since 4.5.0
*/
public function test_shortcodes_getty_image() {
- $this->markTestSkipped();
-
$image_id = '82278805';
$content = "[getty src='$image_id']";
$shortcode_content = do_shortcode( $content );
- $this->assertContains( '