Changeset 44155 for trunk/tests/phpunit/tests/oembed/controller.php
- Timestamp:
- 12/14/2018 03:24:35 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/oembed/controller.php
r44154 r44155 13 13 protected static $administrator; 14 14 protected static $subscriber; 15 const YOUTUBE_VIDEO_ID = 'OQSNhk5ICTI';16 const INVALID_OEMBED_URL = 'https://www.notreallyanoembedprovider.com/watch?v=awesome-cat-video';15 const YOUTUBE_VIDEO_ID = 'OQSNhk5ICTI'; 16 const INVALID_OEMBED_URL = 'https://www.notreallyanoembedprovider.com/watch?v=awesome-cat-video'; 17 17 const UNTRUSTED_PROVIDER_URL = 'https://www.untrustedprovider.com'; 18 18 … … 138 138 'body' => wp_json_encode( 139 139 array( 140 'version' 141 'type' 142 'provider_name' 143 'provider_url' 144 'html' 145 'author_name' 146 'title' 140 'version' => '1.0', 141 'type' => 'rich', 142 'provider_name' => 'Untrusted', 143 'provider_url' => self::UNTRUSTED_PROVIDER_URL, 144 'html' => '<b>Filtered</b><a href="">Unfiltered</a>', 145 'author_name' => 'Untrusted Embed Author', 146 'title' => 'Untrusted Embed', 147 147 ) 148 148 ), … … 652 652 wp_set_current_user( self::$editor ); 653 653 654 $user = self::factory()->user->create_and_get( array( 655 'display_name' => 'John Doe', 656 ) ); 657 $post = self::factory()->post->create_and_get( array( 658 'post_author' => $user->ID, 659 'post_title' => 'Hello World', 660 ) ); 654 $user = self::factory()->user->create_and_get( 655 array( 656 'display_name' => 'John Doe', 657 ) 658 ); 659 $post = self::factory()->post->create_and_get( 660 array( 661 'post_author' => $user->ID, 662 'post_title' => 'Hello World', 663 ) 664 ); 661 665 662 666 $request = new WP_REST_Request( 'GET', '/oembed/1.0/proxy' ); … … 696 700 wp_set_current_user( self::$editor ); 697 701 698 $post = self::factory()->post->create_and_get( array( 699 'post_title' => 'Front page', 700 'post_type' => 'page', 701 'post_author' => 0, 702 ) ); 702 $post = self::factory()->post->create_and_get( 703 array( 704 'post_title' => 'Front page', 705 'post_type' => 'page', 706 'post_author' => 0, 707 ) 708 ); 703 709 704 710 update_option( 'show_on_front', 'page' );
Note: See TracChangeset
for help on using the changeset viewer.