Changeset 53524
- Timestamp:
- 06/19/2022 03:19:17 PM (4 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/image/functions.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/image/functions.php
r53523 r53524 80 80 81 81 /** 82 * Data Provider.82 * Data provider. 83 83 * 84 84 * @return array … … 108 108 } 109 109 110 public function test_is_image_negative() { 110 /** 111 * @dataProvider data_is_image_negative 112 * 113 * @covers ::file_is_valid_image 114 * @covers ::wp_getimagesize 115 * 116 * @param string $file File name. 117 */ 118 public function test_is_image_negative( $file ) { 119 $this->assertFalse( 120 file_is_valid_image( DIR_TESTDATA . '/images/' . $file ), 121 "file_is_valid_image( '$file' ) should return false" 122 ); 123 } 124 125 /** 126 * Data provider. 127 * 128 * @return array 129 */ 130 public function data_is_image_negative() { 111 131 // These are actually image files but aren't recognized or usable by PHP. 112 132 $files = array( … … 116 136 ); 117 137 118 foreach ( $files as $file ) { 119 $this->assertFalse( file_is_valid_image( DIR_TESTDATA . '/images/' . $file ), "file_is_valid_image($file) should return false" ); 120 } 138 return $this->text_array_to_dataprovider( $files ); 121 139 } 122 140
Note: See TracChangeset
for help on using the changeset viewer.