Changeset 41140 for branches/4.8/tests/phpunit/tests/oembed/controller.php
- Timestamp:
- 07/25/2017 12:53:47 AM (7 years ago)
- Location:
- branches/4.8
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.8
-
branches/4.8/tests/phpunit/tests/oembed/controller.php
r41049 r41140 417 417 418 418 function test_get_oembed_endpoint_url() { 419 $this->assertEquals( home_url() . '/ ?rest_route=/oembed/1.0/embed', get_oembed_endpoint_url() );420 $this->assertEquals( home_url() . '/ ?rest_route=/oembed/1.0/embed', get_oembed_endpoint_url( '', 'json' ) );421 $this->assertEquals( home_url() . '/ ?rest_route=/oembed/1.0/embed', get_oembed_endpoint_url( '', 'xml' ) );419 $this->assertEquals( home_url() . '/index.php?rest_route=/oembed/1.0/embed', get_oembed_endpoint_url() ); 420 $this->assertEquals( home_url() . '/index.php?rest_route=/oembed/1.0/embed', get_oembed_endpoint_url( '', 'json' ) ); 421 $this->assertEquals( home_url() . '/index.php?rest_route=/oembed/1.0/embed', get_oembed_endpoint_url( '', 'xml' ) ); 422 422 423 423 $post_id = $this->factory()->post->create(); … … 425 425 $url_encoded = urlencode( $url ); 426 426 427 $this->assertEquals( home_url() . '/ ?rest_route=%2Foembed%2F1.0%2Fembed&url=' . $url_encoded, get_oembed_endpoint_url( $url ) );428 $this->assertEquals( home_url() . '/ ?rest_route=%2Foembed%2F1.0%2Fembed&url=' . $url_encoded . '&format=xml', get_oembed_endpoint_url( $url, 'xml' ) );427 $this->assertEquals( home_url() . '/index.php?rest_route=%2Foembed%2F1.0%2Fembed&url=' . $url_encoded, get_oembed_endpoint_url( $url ) ); 428 $this->assertEquals( home_url() . '/index.php?rest_route=%2Foembed%2F1.0%2Fembed&url=' . $url_encoded . '&format=xml', get_oembed_endpoint_url( $url, 'xml' ) ); 429 429 } 430 430
Note: See TracChangeset
for help on using the changeset viewer.