Changeset 52010 for trunk/tests/phpunit/tests/image/dimensions.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/image/dimensions.php
r48937 r52010 7 7 */ 8 8 class Tests_Image_Dimensions extends WP_UnitTestCase { 9 function test_400x400_no_crop() {9 public function test_400x400_no_crop() { 10 10 // Landscape: resize 640x480 to fit 400x400: 400x300. 11 11 $out = image_resize_dimensions( 640, 480, 400, 400, false ); … … 19 19 } 20 20 21 function test_400x0_no_crop() {21 public function test_400x0_no_crop() { 22 22 // Landscape: resize 640x480 to fit 400w: 400x300. 23 23 $out = image_resize_dimensions( 640, 480, 400, 0, false ); … … 31 31 } 32 32 33 function test_0x400_no_crop() {33 public function test_0x400_no_crop() { 34 34 // Landscape: resize 640x480 to fit 400h: 533x400. 35 35 $out = image_resize_dimensions( 640, 480, 0, 400, false ); … … 43 43 } 44 44 45 function test_800x800_no_crop() {45 public function test_800x800_no_crop() { 46 46 // Landscape: resize 640x480 to fit 800x800. 47 47 $out = image_resize_dimensions( 640, 480, 800, 800, false ); … … 55 55 } 56 56 57 function test_800x0_no_crop() {57 public function test_800x0_no_crop() { 58 58 // Landscape: resize 640x480 to fit 800w. 59 59 $out = image_resize_dimensions( 640, 480, 800, 0, false ); … … 67 67 } 68 68 69 function test_0x800_no_crop() {69 public function test_0x800_no_crop() { 70 70 // Landscape: resize 640x480 to fit 800h. 71 71 $out = image_resize_dimensions( 640, 480, 0, 800, false ); … … 81 81 // Cropped versions. 82 82 83 function test_400x400_crop() {83 public function test_400x400_crop() { 84 84 // Landscape: crop 640x480 to fit 400x400: 400x400 taken from a 480x480 crop at (80. 0). 85 85 $out = image_resize_dimensions( 640, 480, 400, 400, true ); … … 93 93 } 94 94 95 function test_400x0_crop() {95 public function test_400x0_crop() { 96 96 // Landscape: resize 640x480 to fit 400w: 400x300. 97 97 $out = image_resize_dimensions( 640, 480, 400, 0, true ); … … 105 105 } 106 106 107 function test_0x400_crop() {107 public function test_0x400_crop() { 108 108 // Landscape: resize 640x480 to fit 400h: 533x400. 109 109 $out = image_resize_dimensions( 640, 480, 0, 400, true ); … … 117 117 } 118 118 119 function test_400x500_crop() {119 public function test_400x500_crop() { 120 120 // Landscape: crop 640x480 to fit 400x500: 400x400 taken from a 480x480 crop at (80. 0). 121 121 $out = image_resize_dimensions( 640, 480, 400, 500, true ); … … 129 129 } 130 130 131 function test_640x480() {131 public function test_640x480() { 132 132 // Crop 640x480 to fit 640x480 (no change). 133 133 $out = image_resize_dimensions( 640, 480, 640, 480, true ); … … 157 157 * @ticket 19393 158 158 */ 159 function test_crop_anchors() {159 public function test_crop_anchors() { 160 160 // Landscape: crop 640x480 to fit 400x500: 400x400 taken from a 480x480 crop. 161 161 // src_x = 0 (left), src_y = 0 (top).
Note: See TracChangeset
for help on using the changeset viewer.