[wp-trac] [WordPress Trac] #56793: Test tool and unit test improvements for 6.2
WordPress Trac
noreply at wordpress.org
Sat Jan 14 02:06:16 UTC 2023
#56793: Test tool and unit test improvements for 6.2
--------------------------------------+---------------------
Reporter: desrosj | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 6.2
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------
Comment (by SergeyBiryukov):
In [changeset:"55066" 55066]:
{{{
#!CommitTicketReference repository="" revision="55066"
Tests: Move the test for `wp_save_image_file()` with a GD resource to a
more appropriate place.
When passed a GD resource as `$image`, `wp_save_image_file()` should throw
a deprecated argument notice:
{{{
Function wp_save_image_file was called with an argument that is deprecated
since version 3.5.0!
$image needs to be a WP_Image_Editor object.
}}}
The test verifies that the notice is thrown as expected.
Includes:
* Removing the `Tests_Functions_Deprecated` class. It appears to be
initially intended for testing deprecated functions or arguments, but this
was later superseded by the `@expectedDeprecated` annotation.
* Removing a redundant test for `wp_save_image_file()` **not** throwing a
deprecation notice when passed a `WP_Image_Editor` instance. This is
already covered by `test_wp_save_image_file()`, which would fail if there
is an unexpected deprecation notice.
Follow-up to [1061/tests], [25408], [25409], [53529].
See #56793.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/56793#comment:63>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list