Changeset 49005 for trunk/tests/phpunit/tests/comment/slashes.php
- Timestamp:
- 09/19/2020 11:11:00 AM (6 years ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/tests/comment/slashes.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/slashes.php
r49004 r49005 8 8 class Tests_Comment_Slashes extends WP_UnitTestCase { 9 9 protected static $author_id; 10 protected static $post_id; 10 11 11 12 public static function wpSetUpBeforeClass( $factory ) { 12 13 // We need an admin user to bypass comment flood protection. 13 14 self::$author_id = $factory->user->create( array( 'role' => 'administrator' ) ); 15 self::$post_id = $factory->post->create(); 14 16 } 15 17 … … 34 36 */ 35 37 function test_wp_new_comment() { 36 $post_id = self:: factory()->post->create();38 $post_id = self::$post_id; 37 39 38 40 // Not testing comment_author_email or comment_author_url … … 73 75 */ 74 76 function test_edit_comment() { 75 $post_id = self:: factory()->post->create();77 $post_id = self::$post_id; 76 78 $comment_id = self::factory()->comment->create( 77 79 array( … … 119 121 */ 120 122 function test_wp_insert_comment() { 121 $post_id = self:: factory()->post->create();123 $post_id = self::$post_id; 122 124 123 125 $comment_id = wp_insert_comment( … … 150 152 */ 151 153 function test_wp_update_comment() { 152 $post_id = self:: factory()->post->create();154 $post_id = self::$post_id; 153 155 $comment_id = self::factory()->comment->create( 154 156 array(
Note: See TracChangeset
for help on using the changeset viewer.