Skip to content

Commit

Permalink
Update mocked response for the wp_get_attachment_metadata function …
Browse files Browse the repository at this point in the history
…in unit tests.
  • Loading branch information
iamdharmesh committed Mar 19, 2024
1 parent 822f8db commit 5900612
Showing 1 changed file with 1 addition and 45 deletions.
46 changes: 1 addition & 45 deletions tests/unit/test-safe-svg.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,51 +263,7 @@ public function test_one_pixel_fix() {
),
),
array(
'file' => __DIR__ . '/files/svgNoDimensions.svg',
'sizes' => array(
'thumbnail' => array(
'width' => 150,
'height' => 150,
'crop' => 1,
'file' => 'svgNoDimensions.svg',
'mime-type' => 'image/svg+xml',
),
'medium' => array(
'width' => 300,
'height' => 300,
'crop' => 0, // Set to 0 if you don't want to crop
'file' => 'svgNoDimensions.svg',
'mime-type' => 'image/svg+xml',
),
'medium_large' => array(
'width' => 768,
'height' => 0,
'crop' => 0,
'file' => 'svgNoDimensions.svg',
'mime-type' => 'image/svg+xml',
),
'large' => array(
'width' => 1024,
'height' => 1024,
'crop' => 0,
'file' => 'svgNoDimensions.svg',
'mime-type' => 'image/svg+xml',
),
'1536x1536' => array(
'width' => 1536,
'height' => 1536,
'crop' => 0,
'file' => 'svgNoDimensions.svg',
'mime-type' => 'image/svg+xml',
),
'2048x2048' => array(
'width' => 2048,
'height' => 2048,
'crop' => 0,
'file' => 'svgNoDimensions.svg',
'mime-type' => 'image/svg+xml',
),
),
'filesize' => 1001, // wp_get_attachment_metadata response for ./files/svgNoDimensions.svg file doesn't contain dimensions and sizes array.
),
),
)
Expand Down

0 comments on commit 5900612

Please sign in to comment.