From 7e557100254a27405f588bd84f7cd188d0eafba0 Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Mon, 29 Feb 2016 22:13:28 +0000 Subject: [PATCH] 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. git-svn-id: https://develop.svn.wordpress.org/trunk@36787 602fd350-edb4-49c9-b593-d223f7449a82 --- tests/phpunit/tests/meta/slashes.php | 36 ---------------------------- 1 file changed, 36 deletions(-) diff --git a/tests/phpunit/tests/meta/slashes.php b/tests/phpunit/tests/meta/slashes.php index cb948e6944..693ba06b50 100644 --- a/tests/phpunit/tests/meta/slashes.php +++ b/tests/phpunit/tests/meta/slashes.php @@ -142,42 +142,6 @@ class Tests_Meta_Slashes extends WP_UnitTestCase { $this->assertEquals( $this->slash_4, get_post_meta( $id, 'slash_test_3', true ) ); } - /** - * Tests the model function that expects un-slashed data - * - */ - function test_wp_add_post_meta() { - if ( !function_exists( 'wp_add_post_meta' ) ) { - return; - } - $id = self::factory()->post->create(); - wp_add_post_meta( $id, 'slash_test_1', $this->slash_1 ); - wp_add_post_meta( $id, 'slash_test_2', $this->slash_3 ); - wp_add_post_meta( $id, 'slash_test_3', $this->slash_4 ); - - $this->assertEquals( $this->slash_1, get_post_meta( $id, 'slash_test_1', true ) ); - $this->assertEquals( $this->slash_3, get_post_meta( $id, 'slash_test_2', true ) ); - $this->assertEquals( $this->slash_4, get_post_meta( $id, 'slash_test_3', true ) ); - } - - /** - * Tests the model function that expects un-slashed data - * - */ - function test_wp_update_post_meta() { - if ( !function_exists( 'wp_update_post_meta' ) ) { - return; - } - $id = self::factory()->post->create(); - wp_update_post_meta( $id, 'slash_test_1', $this->slash_1 ); - wp_update_post_meta( $id, 'slash_test_2', $this->slash_3 ); - wp_update_post_meta( $id, 'slash_test_3', $this->slash_4 ); - - $this->assertEquals( $this->slash_1, get_post_meta( $id, 'slash_test_1', true ) ); - $this->assertEquals( $this->slash_3, get_post_meta( $id, 'slash_test_2', true ) ); - $this->assertEquals( $this->slash_4, get_post_meta( $id, 'slash_test_3', true ) ); - } - /** * Tests the model function that expects slashed data *