Tests: Change a few remaining include_once
statements to require_once
, for consistency.
See #48082. git-svn-id: https://develop.svn.wordpress.org/trunk@47200 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
8640eaa96e
commit
3096571047
@ -154,7 +154,7 @@ class Test_Functions_Deprecated extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
// Call wp_save_image_file().
|
||||
include_once ABSPATH . 'wp-admin/includes/image-edit.php';
|
||||
require_once ABSPATH . 'wp-admin/includes/image-edit.php';
|
||||
$file = wp_tempnam();
|
||||
$img = imagecreatefromjpeg( DIR_TESTDATA . '/images/canola.jpg' );
|
||||
wp_save_image_file( $file, $img, 'image/jpeg', 1 );
|
||||
@ -177,7 +177,7 @@ class Test_Functions_Deprecated extends WP_UnitTestCase {
|
||||
}
|
||||
|
||||
// Call wp_save_image_file().
|
||||
include_once ABSPATH . 'wp-admin/includes/image-edit.php';
|
||||
require_once ABSPATH . 'wp-admin/includes/image-edit.php';
|
||||
$file = wp_tempnam();
|
||||
$img = wp_get_image_editor( DIR_TESTDATA . '/images/canola.jpg' );
|
||||
wp_save_image_file( $file, $img, 'image/jpeg', 1 );
|
||||
|
@ -90,7 +90,7 @@ class Tests_L10n_loadTextdomainJustInTime extends WP_UnitTestCase {
|
||||
|
||||
switch_theme( 'internationalized-theme' );
|
||||
|
||||
include_once get_stylesheet_directory() . '/functions.php';
|
||||
require_once get_stylesheet_directory() . '/functions.php';
|
||||
|
||||
$is_textdomain_loaded_before = is_textdomain_loaded( 'internationalized-theme' );
|
||||
$expected_output = i18n_theme_test();
|
||||
|
@ -36,7 +36,7 @@ class Tests_Menu_WpAjaxMenuQuickSeach extends WP_UnitTestCase {
|
||||
* @ticket 27042
|
||||
*/
|
||||
public function test_search_returns_results_for_pages() {
|
||||
include_once ABSPATH . 'wp-admin/includes/nav-menu.php';
|
||||
require_once ABSPATH . 'wp-admin/includes/nav-menu.php';
|
||||
|
||||
self::factory()->post->create_many(
|
||||
3,
|
||||
|
@ -1661,7 +1661,7 @@ class Tests_User_Query extends WP_UnitTestCase {
|
||||
|
||||
$ids = $q->get_results();
|
||||
|
||||
/* must include user that has same string in display_name */
|
||||
// Must include user that has the same string in display_name.
|
||||
$this->assertEquals( array( $new_user1 ), $ids );
|
||||
}
|
||||
|
||||
@ -1689,7 +1689,7 @@ class Tests_User_Query extends WP_UnitTestCase {
|
||||
|
||||
$ids = $q->get_results();
|
||||
|
||||
/* must not include user that has same string in other fields */
|
||||
// Must not include user that has the same string in other fields.
|
||||
$this->assertEquals( array(), $ids );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user