Make WordPress Core

Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#59696 closed defect (bug) (fixed)

Fix duotone PHP Unit tests - Allow to run it individually

Reported by: cbravobernal's profile cbravobernal Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.5 Priority: normal
Severity: normal Version:
Component: Build/Test Tools Keywords: has-patch has-unit-tests
Focuses: Cc:

Description


Change History (4)

This ticket was mentioned in PR #5542 on WordPress/wordpress-develop by @cbravobernal.


9 months ago
#1

  • Keywords has-patch has-unit-tests added

Right now, if I try to run docker-compose run php ./vendor/bin/phpunit tests/phpunit/tests/block-supports/duotone.php I get the error Class duotone could not be found in /var/www/tests/phpunit/tests/block-supports/duotone.php

It seems that tests are not running individually, as it doesn't match with its real Class called WP_Duotone, not WP_Duotones.

Attached screenshots:

Before:
https://i0.wp.com/github.com/WordPress/wordpress-develop/assets/37012961/36c47bf8-68cb-461d-8037-407145bfd71a

After:
https://i0.wp.com/github.com/WordPress/wordpress-develop/assets/37012961/35e9ae7a-8b69-4515-a785-a9b2c7241e00

Trac ticket: https://core.trac.wordpress.org/ticket/59696

#2 @SergeyBiryukov
9 months ago

  • Component changed from General to Build/Test Tools
  • Milestone changed from Awaiting Review to 6.5

#3 @SergeyBiryukov
9 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 56981:

Tests: Correct test class name for WP_Duotone unit tests.

Follow-up to [56101].

Props cbravobernal.
Fixes #59696.

@SergeyBiryukov commented on PR #5542:


9 months ago
#4

Thanks for the PR! Merged in r56981.

Note: See TracTickets for help on using tickets.