Changeset 10159 for trunk/tests/phpunit/testcases/core/functions.php
- Timestamp:
- 09/29/2015 11:22:24 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/functions.php
r10092 r10159 685 685 $bp->active_components = $reset_active_components; 686 686 } 687 688 /** 689 * @group bp_attachments 690 */ 691 public function test_bp_attachments_get_allowed_types() { 692 $supported = array( 'jpeg', 'gif', 'png' ); 693 694 $avatar = bp_attachments_get_allowed_types( 'avatar' ); 695 $this->assertSame( $supported, $avatar ); 696 697 $cover_image = bp_attachments_get_allowed_types( 'cover_image' ); 698 $this->assertSame( $supported, $cover_image ); 699 700 $images = bp_attachments_get_allowed_types( 'image/' ); 701 702 foreach ( $images as $image ) { 703 if ( 'image' !== wp_ext2type( $image ) ) { 704 $not_image = $image; 705 } 706 } 707 708 $this->assertTrue( empty( $not_image ) ); 709 } 687 710 }
Note: See TracChangeset
for help on using the changeset viewer.