Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
08/13/2022 12:59:52 PM (3 years ago)
Author:
imath
Message:

Media: adjust avatar/cover image unit tests for the WP v5.7 context

As the .webp image file type will only be available if WP version >= 5.8, we need to only check for it using the same requirement.

Fixes #8643

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/core/functions.php

    r13315 r13316  
    785785     */
    786786    public function test_bp_attachments_get_allowed_types() {
    787         $supported = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'webp' );
     787        $supported = array( 'jpg', 'jpeg', 'jpe', 'gif', 'png' );
     788        if ( bp_is_running_wp( '5.8.0', '>=' ) ) {
     789            $supported[] = 'webp';
     790        }
    788791
    789792        $avatar = bp_attachments_get_allowed_types( 'avatar' );
Note: See TracChangeset for help on using the changeset viewer.