Changeset 55070
- Timestamp:
- 01/15/2023 01:36:10 PM (22 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/image/functions.php
r55066 r55070 284 284 285 285 // Make assertions. 286 $this->assertNotEmpty( $ret, 'Image failed to save - "empty" response returned.' );287 286 $this->assertNotWPError( $ret, 'Image failed to save - WP_Error returned.' ); 287 $this->assertIsArray( $ret, 'Image failed to save - non-array response returned.' ); 288 288 $this->assertSame( $mime_type, $this->get_mime_type( $ret['path'] ), 'Mime type of the saved image does not match.' ); 289 289 … … 375 375 376 376 // Make assertions. 377 $this->assertNotEmpty( $ret, 'Image failed to save - "empty" response returned.' );378 377 $this->assertNotWPError( $ret, 'Image failed to save - WP_Error returned.' ); 378 $this->assertIsArray( $ret, 'Image failed to save - non-array response returned.' ); 379 379 $this->assertSame( $mime_type, $this->get_mime_type( $ret['path'] ), 'Mime type of the saved image did not override file name.' ); 380 380 … … 421 421 422 422 // Make assertions. 423 $this->assertNotEmpty( $ret, 'Image failed to save - "empty" response returned.' );424 423 $this->assertNotWPError( $ret, 'Image failed to save - WP Error returned.' ); 424 $this->assertIsArray( $ret, 'Image failed to save - non-array response returned.' ); 425 425 $this->assertSame( $mime_type, $this->get_mime_type( $ret['path'] ), 'Mime type of the saved image was not inferred correctly.' ); 426 426 … … 680 680 ); 681 681 682 $this->assertNotEmpty( $attachment_id ); 682 $this->assertNotWPError( $attachment_id, 'Could not create attachment - WP_Error returned.' ); 683 $this->assertIsInt( $attachment_id, 'Could not create attachment - non-integer response returned.' ); 683 684 684 685 $temp_dir = get_temp_dir(); … … 757 758 ); 758 759 759 $this->assertNotEmpty( $attachment_id ); 760 $this->assertNotWPError( $attachment_id, 'Could not create attachment - WP_Error returned.' ); 761 $this->assertIsInt( $attachment_id, 'Could not create attachment - non-integer response returned.' ); 760 762 761 763 $temp_dir = get_temp_dir(); … … 830 832 ); 831 833 832 $this->assertNotEmpty( $attachment_id ); 834 $this->assertNotWPError( $attachment_id, 'Could not create attachment - WP_Error returned.' ); 835 $this->assertIsInt( $attachment_id, 'Could not create attachment - non-integer response returned.' ); 833 836 834 837 add_image_size( 'test-size', 100, 100 );
Note: See TracChangeset
for help on using the changeset viewer.