Skip to:
Content

BuddyPress.org

Ticket #7432: 7432.01.patch

File 7432.01.patch, 1.4 KB (added by r-a-y, 8 years ago)
  • tests/phpunit/testcases/core/class-bp-attachment.php

     
    377377         * @group avatars
    378378         */
    379379        public function test_bp_attachment_avatar_shrink() {
     380                if ( false === _wp_image_editor_choose() ) {
     381                        $this->markTestSkipped( 'This test requires PHP to have a valid image editor that is compatible with WordPress.' );
     382                }
     383
    380384                $image = BP_TESTS_DIR . 'assets/upside-down.jpg';
    381385
    382386                $dir_copy = bp_upload_dir();
     
    421425         * @group cover_images
    422426         */
    423427        public function test_bp_attachment_cover_image_fit() {
     428                if ( false === _wp_image_editor_choose() ) {
     429                        $this->markTestSkipped( 'This test requires PHP to have a valid image editor that is compatible with WordPress.' );
     430                }
     431
    424432                $image = BP_TESTS_DIR . 'assets/upside-down.jpg';
    425433
    426434                $cover_image_class = new BP_Attachment_Cover_Image();
     
    456464         * @group cover_images
    457465         */
    458466        public function test_bp_attachment_get_image_data() {
     467                if ( ! is_callable( 'exif_read_data' ) ) {
     468                        $this->markTestSkipped( 'This test requires PHP to be compiled with EXIF support.' );
     469                }
     470
    459471                $image_data = BP_Attachment::get_image_data( BP_TESTS_DIR . 'assets/upside-down.jpg' );
    460472
    461473                $this->assertTrue( 3 == $image_data['meta']['orientation'] );