Changeset 49005 for trunk/tests/phpunit/tests/meta/slashes.php
- Timestamp:
- 09/19/2020 11:11:00 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/meta/slashes.php
r49004 r49005 10 10 protected static $post_id; 11 11 protected static $comment_id; 12 protected static $user_id; 12 13 13 14 public static function wpSetUpBeforeClass( $factory ) { … … 15 16 self::$post_id = $factory->post->create(); 16 17 self::$comment_id = $factory->comment->create( array( 'comment_post_ID' => self::$post_id ) ); 18 self::$user_id = $factory->user->create(); 17 19 } 18 20 … … 35 37 */ 36 38 function test_edit_post() { 37 $post_id = self:: factory()->post->create();39 $post_id = self::$post_id; 38 40 39 41 if ( function_exists( 'wp_add_post_meta' ) ) { … … 112 114 */ 113 115 function test_add_post_meta() { 114 $post_id = self:: factory()->post->create();116 $post_id = self::$post_id; 115 117 116 118 add_post_meta( $post_id, 'slash_test_1', addslashes( $this->slash_1 ) ); … … 127 129 */ 128 130 function test_update_post_meta() { 129 $post_id = self:: factory()->post->create();131 $post_id = self::$post_id; 130 132 131 133 update_post_meta( $post_id, 'slash_test_1', addslashes( $this->slash_1 ) ); … … 192 194 */ 193 195 function test_add_user_meta() { 194 $user_id = self:: factory()->user->create();196 $user_id = self::$user_id; 195 197 196 198 add_user_meta( $user_id, 'slash_test_1', $this->slash_1 ); … … 215 217 */ 216 218 function test_update_user_meta() { 217 $user_id = self:: factory()->user->create();219 $user_id = self::$user_id; 218 220 219 221 add_user_meta( $user_id, 'slash_test_1', 'foo' );
Note: See TracChangeset
for help on using the changeset viewer.