Make WordPress Core

Changeset 47200


Ignore:
Timestamp:
02/06/2020 09:40:05 PM (7 years ago)
Author:
SergeyBiryukov
Message:

Tests: Change a few remaining include_once statements to require_once, for consistency.

See #48082.

Location:
trunk/tests/phpunit/tests
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/functions/deprecated.php

    r47198 r47200  
    155155
    156156                // Call wp_save_image_file().
    157                 include_once ABSPATH . 'wp-admin/includes/image-edit.php';
     157                require_once ABSPATH . 'wp-admin/includes/image-edit.php';
    158158                $file = wp_tempnam();
    159159                $img  = imagecreatefromjpeg( DIR_TESTDATA . '/images/canola.jpg' );
     
    178178
    179179                // Call wp_save_image_file().
    180                 include_once ABSPATH . 'wp-admin/includes/image-edit.php';
     180                require_once ABSPATH . 'wp-admin/includes/image-edit.php';
    181181                $file = wp_tempnam();
    182182                $img  = wp_get_image_editor( DIR_TESTDATA . '/images/canola.jpg' );
  • trunk/tests/phpunit/tests/l10n/loadTextdomainJustInTime.php

    r45607 r47200  
    9191                switch_theme( 'internationalized-theme' );
    9292
    93                 include_once get_stylesheet_directory() . '/functions.php';
     93                require_once get_stylesheet_directory() . '/functions.php';
    9494
    9595                $is_textdomain_loaded_before = is_textdomain_loaded( 'internationalized-theme' );
  • trunk/tests/phpunit/tests/menu/wpAjaxMenuQuickSearch.php

    r46586 r47200  
    3737         */
    3838        public function test_search_returns_results_for_pages() {
    39                 include_once ABSPATH . 'wp-admin/includes/nav-menu.php';
     39                require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
    4040
    4141                self::factory()->post->create_many(
  • trunk/tests/phpunit/tests/user/query.php

    r47122 r47200  
    16621662                $ids = $q->get_results();
    16631663
    1664                 /* must include user that has same string in display_name */
     1664                // Must include user that has the same string in display_name.
    16651665                $this->assertEquals( array( $new_user1 ), $ids );
    16661666        }
     
    16901690                $ids = $q->get_results();
    16911691
    1692                 /* must not include user that has same string in other fields */
     1692                // Must not include user that has the same string in other fields.
    16931693                $this->assertEquals( array(), $ids );
    16941694        }
Note: See TracChangeset for help on using the changeset viewer.