Changeset 55066
- Timestamp:
- 01/14/2023 02:06:02 AM (22 months ago)
- Location:
- trunk/tests/phpunit/tests
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/image/functions.php
r54226 r55066 326 326 327 327 return $data; 328 } 329 330 /** 331 * Tests that wp_save_image_file() throws a deprecated argument notice when passed a GD resource. 332 * 333 * @ticket 6821 334 * @expectedDeprecated wp_save_image_file 335 * @requires function imagejpeg 336 * 337 * @covers ::wp_save_image_file 338 */ 339 public function test_wp_save_image_file_deprecated_argument_with_gd_resource() { 340 require_once ABSPATH . 'wp-admin/includes/image-edit.php'; 341 342 // Call wp_save_image_file(). 343 $file = wp_tempnam(); 344 $img = imagecreatefromjpeg( DIR_TESTDATA . '/images/canola.jpg' ); 345 $ret = wp_save_image_file( $file, $img, 'image/jpeg', 1 ); 346 347 imagedestroy( $img ); 348 unlink( $file ); 349 350 $this->assertTrue( $ret, 'Image failed to save.' ); 328 351 } 329 352
Note: See TracChangeset
for help on using the changeset viewer.