Changeset 53526
- Timestamp:
- 06/19/2022 03:34:21 PM (6 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/image/functions.php
r53525 r53526 88 88 $files = array( 89 89 'test-image-cmyk.jpg', 90 'test-image-grayscale.jpg', 90 91 'test-image.bmp', 91 'test-image-grayscale.jpg',92 92 'test-image.gif', 93 93 'test-image.png', … … 181 181 } 182 182 183 public function test_is_displayable_image_negative() { 183 /** 184 * @dataProvider data_is_displayable_image_negative 185 * 186 * @covers ::file_is_displayable_image 187 * 188 * @param string $file File name. 189 */ 190 public function test_is_displayable_image_negative( $file ) { 191 $this->assertFalse( 192 file_is_displayable_image( DIR_TESTDATA . '/images/' . $file ), 193 "file_is_displayable_image( '$file' ) should return false" 194 ); 195 } 196 197 /** 198 * Data provider. 199 * 200 * @return array 201 */ 202 public function data_is_displayable_image_negative() { 184 203 // These are image files but aren't suitable for web pages because of compatibility or size issues. 185 204 $files = array( 186 205 // 'test-image-cmyk.jpg', Allowed in r9727. 206 // 'test-image-grayscale.jpg', Allowed in r9727. 187 207 // 'test-image.bmp', Allowed in r28589. 188 // 'test-image-grayscale.jpg', Allowed in r9727.189 208 'test-image.pct', 190 209 'test-image.tga', … … 197 216 ); 198 217 199 foreach ( $files as $file ) { 200 $this->assertFalse( file_is_displayable_image( DIR_TESTDATA . '/images/' . $file ), "file_is_valid_image($file) should return false" ); 201 } 218 return $this->text_array_to_dataprovider( $files ); 202 219 } 203 220
Note: See TracChangeset
for help on using the changeset viewer.