Changeset 49003 for trunk/tests/phpunit/tests/comment/slashes.php
- Timestamp:
- 09/19/2020 10:34:54 AM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/comment/slashes.php
r48937 r49003 7 7 */ 8 8 class Tests_Comment_Slashes extends WP_UnitTestCase { 9 protected static $author_id; 10 11 public static function wpSetUpBeforeClass( $factory ) { 12 // We need an admin user to bypass comment flood protection. 13 self::$author_id = $factory->user->create( array( 'role' => 'administrator' ) ); 14 } 15 9 16 function setUp() { 10 17 parent::setUp(); 11 // We need an admin user to bypass comment flood protection. 12 $this->author_id = self::factory()->user->create( array( 'role' => 'administrator' ) ); 13 wp_set_current_user( $this->author_id ); 18 19 wp_set_current_user( self::$author_id ); 14 20 15 21 // It is important to test with both even and odd numbered slashes,
Note: See TracChangeset
for help on using the changeset viewer.