Make WordPress Core


Ignore:
Timestamp:
09/19/2020 11:11:00 AM (5 years ago)
Author:
SergeyBiryukov
Message:

Tests: Speed up slashed data tests by reusing some more shared fixtures.

Follow-up to [35249], [49003].

See #51344.

File:
1 edited

Legend:

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

    r49004 r49005  
    88class Tests_User_Slashes extends WP_UnitTestCase {
    99    protected static $author_id;
     10    protected static $user_id;
    1011
    1112    public static function wpSetUpBeforeClass( $factory ) {
    1213        self::$author_id = $factory->user->create( array( 'role' => 'administrator' ) );
     14        self::$user_id   = $factory->user->create();
    1315    }
    1416
     
    8890     */
    8991    function test_edit_user() {
    90         $user_id = self::factory()->user->create();
     92        $user_id = self::$user_id;
    9193
    9294        $_POST                 = array();
     
    186188     */
    187189    function test_wp_update_user() {
    188         $user_id = self::factory()->user->create();
     190        $user_id = self::$user_id;
    189191        $user_id = wp_update_user(
    190192            array(
Note: See TracChangeset for help on using the changeset viewer.