WordPress / WordPress/phpunit-test-runner

Test failed on Tests_Image_Editor_Imagick::test_resizes_are_small_for_16bit_images

Open
#237 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug ContributorDay WCUS26
Dominant language
PHP
Stars
77
Forks
77
Avg merge
15d 15h
Merged PRs (30d)
4

Description

Describe the bug
Test is failing

There was 1 failure:

1) Tests_Image_Editor_Imagick::test_resizes_are_small_for_16bit_images with data set "cloudflare-status" ('/tmp/wp-test-runner/tests/php...us.png')
The resized image file size is not smaller than the original file size.
Failed asserting that 26899 is less than 24940.

/tmp/wp-test-runner/tests/phpunit/tests/image/editorImagick.php:787
/tmp/wp-test-runner/vendor/phpunit/phpunit/phpunit:107

FAILURES!
Tests: 24868, Assertions: 89135, Failures: 1, Warnings: 86, Skipped: 15.
Error: Failed to perform operation.

To Reproduce
Steps to reproduce the behavior:

  • Run php test.php
  • Tested on PHP 8.2, and PHP 8.1 with ImageMagick 7 and 6

Expected behavior
Test to pass

Screenshots
Image

Additional context
This probably happened after the WordPress update on: https://github.com/WordPress/wordpress-develop/commit/082f6e6f3bb0716969414d47b9fe71251b984ccb

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running php test.php and inspect tests/phpunit/tests/image/editorImagick.php around line 787, where Tests_Image_Editor_Imagick::test_resizes_are_small_for_16bit_images fails for the cloudflare-status dataset. Compare the test behavior with WordPress commit 082f6e6f3bb0716969414d47b9fe71251b984ccb; done means the failing test passes on the supported PHP and ImageMagick versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
62/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.