Changeset 50288
- Timestamp:
- 02/11/2021 08:52:52 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/editor/wpEditors.php
r48939 r50288 9 9 */ 10 10 class Tests_WP_Editors extends WP_UnitTestCase { 11 public function wp_link_query_callback( $results ) {12 return array_merge(13 $results,14 array(15 array(16 'ID' => 123,17 'title' => 'foo',18 'permalink' => 'bar',19 'info' => 'baz',20 ),21 )22 );23 }24 11 12 /** 13 * @covers _WP_Editors::wp_link_query 14 */ 25 15 public function test_wp_link_query_returns_false_when_nothing_found() { 26 16 $actual = _WP_Editors::wp_link_query( array( 's' => 'foobarbaz' ) ); … … 29 19 } 30 20 21 /** 22 * @covers _WP_Editors::wp_link_query 23 */ 31 24 public function test_wp_link_query_returns_search_results() { 32 25 $post = self::factory()->post->create_and_get( array( 'post_status' => 'publish' ) ); … … 48 41 /** 49 42 * @ticket 41825 43 * 44 * @covers _WP_Editors::wp_link_query 50 45 */ 51 46 public function test_wp_link_query_returns_filtered_result_when_nothing_found() { … … 67 62 } 68 63 64 /** 65 * @covers _WP_Editors::wp_link_query 66 */ 69 67 public function test_wp_link_query_returns_filtered_search_results() { 70 68 $post = self::factory()->post->create_and_get( array( 'post_status' => 'publish' ) ); … … 92 90 ); 93 91 } 92 93 public function wp_link_query_callback( $results ) { 94 return array_merge( 95 $results, 96 array( 97 array( 98 'ID' => 123, 99 'title' => 'foo', 100 'permalink' => 'bar', 101 'info' => 'baz', 102 ), 103 ) 104 ); 105 } 94 106 }
Note: See TracChangeset
for help on using the changeset viewer.