mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-03 22:27:04 +00:00
Media: Some documentation and test improvements for WebP support:
* Document that WebP constants are only defined in PHP 7.1+. * Correct the `$filename` parameter type in `wp_get_webp_info()`. * Use a consistent message when skipping tests due to the lack of WebP support. * Remove unnecessary `else` branches after `markTestSkipped()`. * Replace `assertEquals()` with more appropriate assertions. Follow-up to [50810]. See #35725. git-svn-id: https://develop.svn.wordpress.org/trunk@50814 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -99,7 +99,8 @@ class Tests_Image_Functions extends WP_UnitTestCase {
|
||||
// Add WebP images if the image editor supports them.
|
||||
$file = DIR_TESTDATA . '/images/test-image.webp';
|
||||
$editor = wp_get_image_editor( $file );
|
||||
if ( ( ! is_wp_error( $editor ) ) && $editor->supports_mime_type( 'image/webp' ) ) {
|
||||
|
||||
if ( ! is_wp_error( $editor ) && $editor->supports_mime_type( 'image/webp' ) ) {
|
||||
$files = array_merge(
|
||||
$files,
|
||||
array(
|
||||
|
||||
Reference in New Issue
Block a user