WordPress.org

Make WordPress Core

Changeset 393 in tests


Ignore:
Timestamp:
08/04/11 17:56:11 (3 years ago)
Author:
ryan
Message:

Update some image tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wp-testcase/test_image.php

    r366 r393  
    5858        $this->assertEquals(200, $out['iso']); 
    5959        $this->assertEquals(1/25, $out['shutter_speed']); 
    60         $this->assertEquals('IPTC Title', $out['title']); 
     60        $this->assertEquals('IPTC Headline', $out['title']); 
    6161    } 
    6262 
     
    479479        // image_resize() should refuse to make an image larger 
    480480        $image = image_resize( DIR_TESTDATA.'/images/test-image.jpg', 100, 100 ); 
    481         $this->assertEquals( false, $image ); 
     481        $this->assertInstanceOf( 'WP_Error', $image ); 
     482        $this->assertEquals( 'error_getting_dimensions', $image->get_error_code() ); 
    482483    } 
    483484     
     
    607608        // these are image files but aren't suitable for web pages because of compatibility or size issues 
    608609        $files = array( 
    609             'test-image-cmyk.jpg', 
     610            // 'test-image-cmyk.jpg', Allowed in r9727 
    610611            'test-image.bmp', 
    611             'test-image-grayscale.jpg', 
     612            // 'test-image-grayscale.jpg', Allowed in r9727 
    612613            'test-image.pct', 
    613614            'test-image.tga', 
     
    619620            'test-image-zip.tiff', 
    620621            ); 
    621              
     622 
    622623        foreach ($files as $file) { 
    623624            $this->assertFalse( file_is_displayable_image( DIR_TESTDATA.'/images/'.$file ), "file_is_valid_image($file) should return false" ); 
Note: See TracChangeset for help on using the changeset viewer.