Tests: Use more specific assertions in Tests_Image_Functions::test_load_directory()
.
This avoids an error on PHP 8 caused by calling `get_resource_type()` on a string. See #50913. git-svn-id: https://develop.svn.wordpress.org/trunk@49015 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
68b71263f3
commit
e92ddaa2c3
@ -320,10 +320,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->assertInstanceOf( 'WP_Error', $editor2 );
|
||||
|
||||
$classes = array( 'WP_Image_Editor_GD', 'WP_Image_Editor_Imagick' );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user