Skip to content

Commit

Permalink
fix api png to jpg test
Browse files Browse the repository at this point in the history
  • Loading branch information
nosilver4u committed Jan 17, 2024
1 parent def4b75 commit 2f13c9c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test-convert.php
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,10 @@ function test_api_convert_png_to_jpg_alpha() {
update_site_option( 'ewww_image_optimizer_png_to_jpg', true );
update_site_option( 'ewww_image_optimizer_jpg_background', '' );

$test_png = download_url( 'https://ewwwio-test.sfo2.digitaloceanspaces.com/unit-tests/books.png' );
rename( $test_png, dirname( self::$test_png ) . wp_basename( $test_png ) );
$test_png = dirname( self::$test_png ) . wp_basename( $test_png );

// No background, conversion will fail, using API.
update_option( 'ewww_image_optimizer_cloud_key', self::$api_key );
update_site_option( 'ewww_image_optimizer_cloud_key', self::$api_key );
Expand Down

0 comments on commit 2f13c9c

Please sign in to comment.