Make WordPress Core


Ignore:
Timestamp:
11/30/2017 11:09:33 PM (6 years ago)
Author:
pento
Message:

Code is Poetry.
WordPress' code just... wasn't.
This is now dealt with.

Props jrf, pento, netweb, GaryJ, jdgrimes, westonruter, Greg Sherwood from PHPCS, and everyone who's ever contributed to WPCS and PHPCS.
Fixes #41057.

File:
1 edited

Legend:

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

    r35242 r42343  
    1111        parent::setUp();
    1212        remove_all_filters( 'session_token_manager' );
    13         $user_id = self::factory()->user->create();
     13        $user_id       = self::factory()->user->create();
    1414        $this->manager = WP_Session_Tokens::get_instance( $user_id );
    1515        $this->assertInstanceOf( 'WP_Session_Tokens', $this->manager );
     
    1919    function test_verify_and_destroy_token() {
    2020        $expiration = time() + DAY_IN_SECONDS;
    21         $token = $this->manager->create( $expiration );
     21        $token      = $this->manager->create( $expiration );
    2222        $this->assertFalse( $this->manager->verify( 'foo' ) );
    2323        $this->assertTrue( $this->manager->verify( $token ) );
     
    2828    function test_destroy_other_tokens() {
    2929        $expiration = time() + DAY_IN_SECONDS;
    30         $token_1 = $this->manager->create( $expiration );
    31         $token_2 = $this->manager->create( $expiration );
    32         $token_3 = $this->manager->create( $expiration );
     30        $token_1    = $this->manager->create( $expiration );
     31        $token_2    = $this->manager->create( $expiration );
     32        $token_3    = $this->manager->create( $expiration );
    3333        $this->assertTrue( $this->manager->verify( $token_1 ) );
    3434        $this->assertTrue( $this->manager->verify( $token_2 ) );
     
    4242    function test_destroy_all_tokens() {
    4343        $expiration = time() + DAY_IN_SECONDS;
    44         $token_1 = $this->manager->create( $expiration );
    45         $token_2 = $this->manager->create( $expiration );
     44        $token_1    = $this->manager->create( $expiration );
     45        $token_2    = $this->manager->create( $expiration );
    4646        $this->assertTrue( $this->manager->verify( $token_1 ) );
    4747        $this->assertTrue( $this->manager->verify( $token_2 ) );
Note: See TracChangeset for help on using the changeset viewer.