Make WordPress Core

Changeset 53572


Ignore:
Timestamp:
06/24/2022 02:41:11 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Give the tests for adding empty post meta values more consistent names.

One of these was previously renamed to mention update_metadata_by_mid().

While update_metadata_by_mid() is indeed called in wp_ajax_add_meta() to update an existing meta value, the functionality change that the test intended to verify was in the latter function.

Follow-up to [44153], [53561].

See #55652.

Location:
trunk/tests/phpunit/tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/admin/includesPost.php

    r53559 r53572  
    828828    /**
    829829     * @ticket 43559
    830      */
    831     public function test_post_add_meta_empty_is_allowed() {
     830     *
     831     * @covers ::add_meta
     832     */
     833    public function test_add_meta_allows_empty_values() {
    832834        $p = self::factory()->post->create();
    833835
  • trunk/tests/phpunit/tests/ajax/AddMeta.php

    r53561 r53572  
    1515     * @ticket 43559
    1616     *
     17     * @covers ::wp_ajax_add_meta
    1718     * @covers ::add_post_meta
    18      * @covers ::wp_ajax_add_meta
    1919     */
    20     public function test_post_add_meta_empty_is_allowed_ajax() {
     20    public function test_wp_ajax_add_meta_allows_empty_values_on_adding() {
    2121        $post = self::factory()->post->create();
    2222
     
    4444     * @ticket 43559
    4545     *
     46     * @covers ::wp_ajax_add_meta
    4647     * @covers ::update_metadata_by_mid
    47      * @covers ::wp_ajax_add_meta
    4848     */
    49     public function test_update_metadata_by_mid_allows_empty_values_ajax() {
     49    public function test_wp_ajax_add_meta_allows_empty_values_on_updating() {
    5050        $post = self::factory()->post->create();
    5151
Note: See TracChangeset for help on using the changeset viewer.