You appear to be a bot. Output may be restricted
Description
Tests that wp_save_image_file() has a deprecated argument when passed a GD resource.
Usage
Tests_Functions_Deprecated::test_wp_save_image_file_deprecated_with_gd_resource();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/functions/deprecated.php
Lines:
1 to 14 of 14
public function test_wp_save_image_file_deprecated_with_gd_resource() { // Call wp_save_image_file(). 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 ); imagedestroy( $img ); unlink( $file ); // Check if the arg was deprecated. $check = $this->was_deprecated( 'argument', 'wp_save_image_file' ); $this->assertNotEmpty( $check ); }