[wp-trac] [WordPress Trac] #55652: Test tool and unit test improvements for 6.1
WordPress Trac
noreply at wordpress.org
Mon Jul 25 13:46:37 UTC 2022
#55652: Test tool and unit test improvements for 6.1
--------------------------------------+---------------------
Reporter: hellofromTonya | Owner: (none)
Type: task (blessed) | Status: new
Priority: normal | Milestone: 6.1
Component: Build/Test Tools | Version:
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+---------------------
Comment (by SergeyBiryukov):
In [changeset:"53774" 53774]:
{{{
#!CommitTicketReference repository="" revision="53774"
Tests: Declare `custom-logo` theme support for custom logo tests.
This addresses failures in `has_custom_logo()` and `get_custom_logo()`
tests when being run separately:
{{{
1) Tests_General_Template::test_has_custom_logo
Custom logo should not be set after removal.
Failed asserting that true is false.
tests/phpunit/tests/general/template.php:291
2) Tests_General_Template::test_get_custom_logo
Custom logo should not be set after removal.
Failed asserting that a string is empty.
tests/phpunit/tests/general/template.php:336
}}}
Specifically, this ensures that the `site_logo` option gets deleted in
`_delete_site_logo_on_remove_theme_mods()`, which in turn prevents the
`core/site-logo` block filters from affecting the custom logo tests.
Alternatively, these filters could be removed instead:
{{{
remove_filter( 'theme_mod_custom_logo', '_override_custom_logo_theme_mod'
);
remove_filter( 'pre_set_theme_mod_custom_logo',
'_sync_custom_logo_to_site_logo' );
}}}
Follow-up to [36905], [51091], [51421], [52042].
See #55652.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55652#comment:87>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list