Changeset 50814 for trunk/tests/phpunit/tests/image/resize.php
- Timestamp:
- 05/05/2021 05:06:17 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/image/resize.php
r50810 r50814 71 71 // Check if the editor supports the webp mime type. 72 72 if ( is_wp_error( $editor ) || ! $editor->supports_mime_type( 'image/webp' ) ) { 73 $this->markTestSkipped( sprintf( ' Skipping test: no WebP support in the editor engine %s on this system.', $this->editor_engine ) );74 } else {75 $image = $this->resize_helper( $file, 25, 25 ); 76 $this->assertSame( 'test-image-25x25.webp', wp_basename( $image ));77 list($w, $h, $type) = wp_getimagesize( $image);78 $this->assertSame( 25, $w);79 $this->assertSame( 25, $h);80 $this->assertSame( IMAGETYPE_WEBP, $type);81 unlink( $image );82 }73 $this->markTestSkipped( sprintf( 'No WebP support in the editor engine %s on this system.', $this->editor_engine ) ); 74 } 75 76 $image = $this->resize_helper( $file, 25, 25 ); 77 $this->assertSame( 'test-image-25x25.webp', wp_basename( $image ) ); 78 list($w, $h, $type) = wp_getimagesize( $image ); 79 $this->assertSame( 25, $w ); 80 $this->assertSame( 25, $h ); 81 $this->assertSame( IMAGETYPE_WEBP, $type ); 82 unlink( $image ); 83 83 } 84 84
Note: See TracChangeset
for help on using the changeset viewer.