Changeset 55467
- Timestamp:
- 03/06/2023 04:27:23 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/media.php
r55318 r55467 3936 3936 /** 3937 3937 * Test that an image size isn't generated if it matches the original image size. 3938 * 3939 * @ticket 57370 3938 3940 */ 3939 3941 public function test_wp_generate_attachment_metadata_doesnt_generate_sizes_for_150_square_image() { … … 3950 3952 3951 3953 $metadata = wp_generate_attachment_metadata( $attachment_id, $file ); 3952 $this->assert Equals(3954 $this->assertSame( 3953 3955 array(), 3954 $metadata['sizes'] 3955 ); 3956 $this->assertEquals( 3956 $metadata['sizes'], 3957 'The sizes should be an empty array' 3958 ); 3959 $this->assertSame( 3957 3960 'test-square-150.jpg', 3958 basename( $metadata['file'] ) 3959 ); 3960 $this->assertEquals( 3961 '150', 3962 $metadata['width'] 3963 ); 3964 $this->assertEquals( 3965 '150', 3966 $metadata['height'] 3961 basename( $metadata['file'] ), 3962 'The file basename should match the given filename' 3963 ); 3964 $this->assertSame( 3965 150, 3966 $metadata['width'], 3967 'The width should be 150 (integer)' 3968 ); 3969 $this->assertSame( 3970 150, 3971 $metadata['height'], 3972 'The height should be 150 (integer)' 3967 3973 ); 3968 3974 }
Note: See TracChangeset
for help on using the changeset viewer.