Skip to content

Commit b328f6b

Browse files
committed
fix tests
1 parent e7a8c3f commit b328f6b

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tests/test-dam.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -333,11 +333,8 @@ public function test_alter_image_tag_w_h() {
333333

334334
// Test custom image sizes.
335335
foreach ( self::IMAGE_SIZES as $size => $image_size_args ) {
336-
$args = [
337-
'width' => $image_size_args['width'],
338-
'height' => $image_size_args['height'],
339-
'crop' => $image_size_args['crop']
340-
];
336+
337+
$args = $this->dam->size_to_dimension( $size, wp_get_attachment_metadata($id) );
341338

342339
$test_url = $this->dam->replace_dam_url_args( $args, $current_attachment['url'] );
343340
$altered_dimensions = $this->dam->alter_img_tag_w_h( $other_dimensions, $test_url, [], $id );

0 commit comments

Comments
 (0)