Changeset 52010 for trunk/tests/phpunit/tests/oembed/controller.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/oembed/controller.php
r51568 r52010 176 176 } 177 177 178 function test_wp_oembed_ensure_format() {178 public function test_wp_oembed_ensure_format() { 179 179 $this->assertSame( 'json', wp_oembed_ensure_format( 'json' ) ); 180 180 $this->assertSame( 'xml', wp_oembed_ensure_format( 'xml' ) ); … … 184 184 } 185 185 186 function test_oembed_create_xml() {186 public function test_oembed_create_xml() { 187 187 $actual = _oembed_create_xml( 188 188 array( … … 261 261 } 262 262 263 function test_request_with_wrong_method() {263 public function test_request_with_wrong_method() { 264 264 $request = new WP_REST_Request( 'POST', '/oembed/1.0/embed' ); 265 265 … … 270 270 } 271 271 272 function test_request_without_url_param() {272 public function test_request_without_url_param() { 273 273 $request = new WP_REST_Request( 'GET', '/oembed/1.0/embed' ); 274 274 … … 280 280 } 281 281 282 function test_request_with_bad_url() {282 public function test_request_with_bad_url() { 283 283 $request = new WP_REST_Request( 'GET', '/oembed/1.0/embed' ); 284 284 $request->set_param( 'url', 'http://google.com/' ); … … 290 290 } 291 291 292 function test_request_invalid_format() {292 public function test_request_invalid_format() { 293 293 $post_id = $this->factory()->post->create(); 294 294 … … 304 304 } 305 305 306 function test_request_json() {306 public function test_request_json() { 307 307 $user = self::factory()->user->create_and_get( 308 308 array( … … 349 349 * @ticket 34971 350 350 */ 351 function test_request_static_front_page() {351 public function test_request_static_front_page() { 352 352 $post = self::factory()->post->create_and_get( 353 353 array( … … 391 391 } 392 392 393 function test_request_xml() {393 public function test_request_xml() { 394 394 $user = self::factory()->user->create_and_get( 395 395 array( … … 438 438 * @group ms-required 439 439 */ 440 function test_request_ms_child_in_root_blog() {440 public function test_request_ms_child_in_root_blog() { 441 441 $child = self::factory()->blog->create(); 442 442 switch_to_blog( $child ); … … 461 461 } 462 462 463 function test_rest_pre_serve_request() {463 public function test_rest_pre_serve_request() { 464 464 $user = $this->factory()->user->create_and_get( 465 465 array( … … 485 485 } 486 486 487 function test_rest_pre_serve_request_wrong_format() {487 public function test_rest_pre_serve_request_wrong_format() { 488 488 $post = $this->factory()->post->create_and_get(); 489 489 … … 497 497 } 498 498 499 function test_rest_pre_serve_request_wrong_method() {499 public function test_rest_pre_serve_request_wrong_method() { 500 500 $post = $this->factory()->post->create_and_get(); 501 501 … … 509 509 } 510 510 511 function test_get_oembed_endpoint_url() {511 public function test_get_oembed_endpoint_url() { 512 512 $this->assertSame( home_url() . '/index.php?rest_route=/oembed/1.0/embed', get_oembed_endpoint_url() ); 513 513 $this->assertSame( home_url() . '/index.php?rest_route=/oembed/1.0/embed', get_oembed_endpoint_url( '', 'json' ) ); … … 522 522 } 523 523 524 function test_get_oembed_endpoint_url_pretty_permalinks() {524 public function test_get_oembed_endpoint_url_pretty_permalinks() { 525 525 update_option( 'permalink_structure', '/%postname%' ); 526 526 … … 675 675 * @ticket 45142 676 676 */ 677 function test_proxy_with_internal_url() {677 public function test_proxy_with_internal_url() { 678 678 wp_set_current_user( self::$editor ); 679 679 … … 723 723 * @ticket 45142 724 724 */ 725 function test_proxy_with_static_front_page_url() {725 public function test_proxy_with_static_front_page_url() { 726 726 wp_set_current_user( self::$editor ); 727 727
Note: See TracChangeset
for help on using the changeset viewer.