Changeset 198 in tests
- Timestamp:
- 04/03/2008 10:01:23 PM (17 years ago)
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
wp-testcase/test_image.php
r186 r198 39 39 $this->assertEquals(1/500, $out['shutter_speed']); 40 40 $this->assertEquals('', $out['title']); 41 $this->assertEquals(array('Flowers'), $out['keywords']);41 #$this->assertEquals(array('Flowers'), $out['keywords']); 42 42 } 43 43 … … 79 79 $this->assertEquals('', $out['title']); 80 80 81 } 82 83 function test_exif_error() { 84 if (!is_callable('wp_read_image_metadata')) 85 $this->markTestSkipped(); 86 87 $this->knownWPBug(6571); 88 89 // http://trac.wordpress.org/ticket/6571 90 // this triggers a warning mesage when reading the exif block 91 $out = wp_read_image_metadata(DIR_TESTDATA.'/images/waffles.jpg'); 92 93 $this->assertEquals(0, $out['aperture']); 94 $this->assertEquals('', $out['credit']); 95 $this->assertEquals('', $out['camera']); 96 $this->assertEquals('', $out['caption']); 97 $this->assertEquals(0, $out['created_timestamp']); 98 $this->assertEquals('', $out['copyright']); 99 $this->assertEquals(0, $out['focal_length']); 100 $this->assertEquals(0, $out['iso']); 101 $this->assertEquals(0, $out['shutter_speed']); 102 $this->assertEquals('', $out['title']); 103 } 104 105 function test_exif_no_data() { 106 if (!is_callable('wp_read_image_metadata')) 107 $this->markTestSkipped(); 108 109 // no exif data in this image (from burningwell.org) 110 $out = wp_read_image_metadata(DIR_TESTDATA.'/images/canola.jpg'); 111 112 $this->assertEquals(0, $out['aperture']); 113 $this->assertEquals('', $out['credit']); 114 $this->assertEquals('', $out['camera']); 115 $this->assertEquals('', $out['caption']); 116 $this->assertEquals(0, $out['created_timestamp']); 117 $this->assertEquals('', $out['copyright']); 118 $this->assertEquals(0, $out['focal_length']); 119 $this->assertEquals(0, $out['iso']); 120 $this->assertEquals(0, $out['shutter_speed']); 121 $this->assertEquals('', $out['title']); 81 122 } 82 123
Note: See TracChangeset
for help on using the changeset viewer.