Make WordPress Core

Changeset 36787


Ignore:
Timestamp:
02/29/2016 10:13:28 PM (9 years ago)
Author:
boonebgorges
Message:

Remove tests related to wp_*_post_meta() functions.

These tests functions were introduced as part of the attempt to straighten out
metadata slashing. See [23416]. The functions were later pulled out [23554],
but the tests were not removed at the same time. Since that point, they've
done nothing, so they can safely be removed.

See #21767. See #36016.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/meta/slashes.php

    r35249 r36787  
    144144
    145145    /**
    146      * Tests the model function that expects un-slashed data
    147      *
    148      */
    149     function test_wp_add_post_meta() {
    150         if ( !function_exists( 'wp_add_post_meta' ) ) {
    151             return;
    152         }
    153         $id = self::factory()->post->create();
    154         wp_add_post_meta( $id, 'slash_test_1', $this->slash_1 );
    155         wp_add_post_meta( $id, 'slash_test_2', $this->slash_3 );
    156         wp_add_post_meta( $id, 'slash_test_3', $this->slash_4 );
    157 
    158         $this->assertEquals( $this->slash_1, get_post_meta( $id, 'slash_test_1', true ) );
    159         $this->assertEquals( $this->slash_3, get_post_meta( $id, 'slash_test_2', true ) );
    160         $this->assertEquals( $this->slash_4, get_post_meta( $id, 'slash_test_3', true ) );
    161     }
    162 
    163     /**
    164      * Tests the model function that expects un-slashed data
    165      *
    166      */
    167     function test_wp_update_post_meta() {
    168         if ( !function_exists( 'wp_update_post_meta' ) ) {
    169             return;
    170         }
    171         $id = self::factory()->post->create();
    172         wp_update_post_meta( $id, 'slash_test_1', $this->slash_1 );
    173         wp_update_post_meta( $id, 'slash_test_2', $this->slash_3 );
    174         wp_update_post_meta( $id, 'slash_test_3', $this->slash_4 );
    175 
    176         $this->assertEquals( $this->slash_1, get_post_meta( $id, 'slash_test_1', true ) );
    177         $this->assertEquals( $this->slash_3, get_post_meta( $id, 'slash_test_2', true ) );
    178         $this->assertEquals( $this->slash_4, get_post_meta( $id, 'slash_test_3', true ) );
    179     }
    180 
    181     /**
    182146     * Tests the model function that expects slashed data
    183147     *
Note: See TracChangeset for help on using the changeset viewer.