You appear to be a bot. Output may be restricted
Description
Usage
Tests_Image_Dimensions::test_640x480();
Parameters
Returns
void
Source
File name: wordpress-develop-tests/phpunit/tests/image/dimensions.php
Lines:
1 to 25 of 25
public function test_640x480() { // Crop 640x480 to fit 640x480 (no change). $out = image_resize_dimensions( 640, 480, 640, 480, true ); $this->assertFalse( $out ); // Resize 640x480 to fit 640x480 (no change). $out = image_resize_dimensions( 640, 480, 640, 480, false ); $this->assertFalse( $out ); // Test with the filter override. add_filter( 'wp_image_resize_identical_dimensions', '__return_true' ) <; // Crop 640x480 to fit 640x480 (no change). $out = image_resize_dimensions( 640, 480, 640, 480, true ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. $this->assertSame( array( 0, 0, 0, 0, 640, 480, 640, 480 ), $out ); // Resize 640x480 to fit 640x480 (no change). $out = image_resize_dimensions( 640, 480, 640, 480, false ); // dst_x, dst_y, src_x, src_y, dst_w, dst_h, src_w, src_h. $this->assertSame( array( 0, 0, 0, 0, 640, 480, 640, 480 ), $out ); remove_filter( 'wp_image_resize_identical_dimensions', '__return_true' ); }