Make WordPress Core

Changeset 50288


Ignore:
Timestamp:
02/11/2021 08:52:52 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Tests: Add missing @covers tags for files in phpunit/tests/editor/.

Props patopaiar, jrf.
See #39265.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/editor/wpEditors.php

    r48939 r50288  
    99 */
    1010class 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         }
    2411
     12        /**
     13         * @covers _WP_Editors::wp_link_query
     14         */
    2515        public function test_wp_link_query_returns_false_when_nothing_found() {
    2616                $actual = _WP_Editors::wp_link_query( array( 's' => 'foobarbaz' ) );
     
    2919        }
    3020
     21        /**
     22         * @covers _WP_Editors::wp_link_query
     23         */
    3124        public function test_wp_link_query_returns_search_results() {
    3225                $post   = self::factory()->post->create_and_get( array( 'post_status' => 'publish' ) );
     
    4841        /**
    4942         * @ticket 41825
     43         *
     44         * @covers _WP_Editors::wp_link_query
    5045         */
    5146        public function test_wp_link_query_returns_filtered_result_when_nothing_found() {
     
    6762        }
    6863
     64        /**
     65         * @covers _WP_Editors::wp_link_query
     66         */
    6967        public function test_wp_link_query_returns_filtered_search_results() {
    7068                $post = self::factory()->post->create_and_get( array( 'post_status' => 'publish' ) );
     
    9290                );
    9391        }
     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        }
    94106}
Note: See TracChangeset for help on using the changeset viewer.