Changeset 13315 for trunk/tests/phpunit/testcases/core/avatars.php
- Timestamp:
- 08/13/2022 12:16:46 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/avatars.php
r13314 r13315 258 258 add_filter( 'bp_core_get_allowed_avatar_types', array( $this, 'avatar_types_filter_add_type' ) ); 259 259 260 $this->assertEquals( array( 'jp eg', 'gif', 'png' ), bp_core_get_allowed_avatar_types() );260 $this->assertEquals( array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'webp' ), bp_core_get_allowed_avatar_types() ); 261 261 262 262 remove_filter( 'bp_core_get_allowed_avatar_types', array( $this, 'avatar_types_filter_add_type' ) ); … … 264 264 add_filter( 'bp_core_get_allowed_avatar_types', array( $this, 'avatar_types_filter_remove_type' ) ); 265 265 266 $this->assertEquals( array( ' gif', 'png' ), bp_core_get_allowed_avatar_types() );266 $this->assertEquals( array( 'jpeg', 'jpe', 'gif', 'png', 'webp' ), bp_core_get_allowed_avatar_types() ); 267 267 268 268 remove_filter( 'bp_core_get_allowed_avatar_types', array( $this, 'avatar_types_filter_remove_type' ) ); … … 270 270 add_filter( 'bp_core_get_allowed_avatar_types', '__return_empty_array' ); 271 271 272 $this->assertEquals( array( 'jp eg', 'gif', 'png' ), bp_core_get_allowed_avatar_types() );272 $this->assertEquals( array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'webp' ), bp_core_get_allowed_avatar_types() ); 273 273 274 274 remove_filter( 'bp_core_get_allowed_avatar_types', '__return_empty_array' ); … … 282 282 $mimes = bp_core_get_allowed_avatar_mimes(); 283 283 284 $this->assertEqualSets( array( 'jp eg', 'gif', 'png', 'jpg' ), array_keys( $mimes ) );285 $this->assertEqualSets( array( 'image/jpeg', 'image/ gif', 'image/png', 'image/jpeg' ), array_values( $mimes ) );284 $this->assertEqualSets( array( 'jpg', 'jpeg', 'jpe', 'gif', 'png', 'webp' ), array_keys( $mimes ) ); 285 $this->assertEqualSets( array( 'image/jpeg', 'image/jpeg', 'image/jpeg', 'image/gif', 'image/png', 'image/webp' ), array_values( $mimes ) ); 286 286 287 287 add_filter( 'bp_core_get_allowed_avatar_types', array( $this, 'avatar_types_filter_add_type' ) ); 288 288 289 $this->assertEqualSets( array( 'image/jpeg', 'image/ gif', 'image/png', 'image/jpeg' ), array_values( bp_core_get_allowed_avatar_mimes() ) );289 $this->assertEqualSets( array( 'image/jpeg', 'image/jpeg', 'image/jpeg', 'image/gif', 'image/png', 'image/webp' ), array_values( bp_core_get_allowed_avatar_mimes() ) ); 290 290 291 291 remove_filter( 'bp_core_get_allowed_avatar_types', array( $this, 'avatar_types_filter_add_type' ) ); … … 293 293 add_filter( 'bp_core_get_allowed_avatar_types', array( $this, 'avatar_types_filter_remove_type' ) ); 294 294 295 $this->assertEqualSets( array( 'image/ gif', 'image/png' ), array_values( bp_core_get_allowed_avatar_mimes() ) );295 $this->assertEqualSets( array( 'image/jpeg', 'image/jpeg', 'image/gif', 'image/png', 'image/webp', 'image/jpeg' ), array_values( bp_core_get_allowed_avatar_mimes() ) ); 296 296 297 297 remove_filter( 'bp_core_get_allowed_avatar_types', array( $this, 'avatar_types_filter_remove_type' ) ); … … 299 299 add_filter( 'bp_core_get_allowed_avatar_types', '__return_empty_array' ); 300 300 301 $this->assertEqualSets( array( 'image/jpeg', 'image/ gif', 'image/png', 'image/jpeg' ), array_values( bp_core_get_allowed_avatar_mimes() ) );301 $this->assertEqualSets( array( 'image/jpeg', 'image/jpeg', 'image/jpeg', 'image/gif', 'image/png', 'image/webp' ), array_values( bp_core_get_allowed_avatar_mimes() ) ); 302 302 303 303 remove_filter( 'bp_core_get_allowed_avatar_types', '__return_empty_array' );
Note: See TracChangeset
for help on using the changeset viewer.