Changeset 46077 for trunk/tests/phpunit/tests/image/dimensions.php
- Timestamp:
- 09/07/2019 01:33:16 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/image/dimensions.php
r42343 r46077 132 132 // crop 640x480 to fit 640x480 (no change) 133 133 $out = image_resize_dimensions( 640, 480, 640, 480, true ); 134 $this->assertFalse( $out ); 135 136 // resize 640x480 to fit 640x480 (no change) 137 $out = image_resize_dimensions( 640, 480, 640, 480, false ); 138 $this->assertFalse( $out ); 139 140 // Test with the filter override. 141 add_filter( 'wp_image_resize_identical_dimensions', '__return_true' ); 142 143 // crop 640x480 to fit 640x480 (no change) 144 $out = image_resize_dimensions( 640, 480, 640, 480, true ); 134 145 // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h 135 146 $this->assertEquals( array( 0, 0, 0, 0, 640, 480, 640, 480 ), $out ); … … 139 150 // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h 140 151 $this->assertEquals( array( 0, 0, 0, 0, 640, 480, 640, 480 ), $out ); 152 153 remove_filter( 'wp_image_resize_identical_dimensions', '__return_true' ); 141 154 } 142 155
Note: See TracChangeset
for help on using the changeset viewer.