From 3c72ff101f0149fa4fe4c8b68829a37687fb7868 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 6 Oct 2017 18:21:16 +0000 Subject: [PATCH] Build/Test Tools: In `Tests_Image_Functions::test_load_directory()`, check the expected internal type instead of using `assertNotInternalType()`, which causes an error with PHPUnit 6.4.0. Props joemcgill. Fixes #42124. git-svn-id: https://develop.svn.wordpress.org/trunk@41784 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/image/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/phpunit/tests/image/functions.php b/tests/phpunit/tests/image/functions.php index 27bdbf3181..d91c6be0a1 100644 --- a/tests/phpunit/tests/image/functions.php +++ b/tests/phpunit/tests/image/functions.php @@ -266,10 +266,10 @@ class Tests_Image_Functions extends WP_UnitTestCase { // First, test with deprecated wp_load_image function $editor1 = wp_load_image( DIR_TESTDATA ); - $this->assertNotInternalType( 'resource', $editor1 ); + $this->assertInternalType( 'string', $editor1 ); $editor2 = wp_get_image_editor( DIR_TESTDATA ); - $this->assertNotInternalType( 'resource', $editor2 ); + $this->assertWPError( $editor2 ); // Then, test with editors. $classes = array('WP_Image_Editor_GD', 'WP_Image_Editor_Imagick');