Changeset 42343 for trunk/tests/phpunit/tests/user/session.php
- Timestamp:
- 11/30/2017 11:09:33 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/user/session.php
r35242 r42343 11 11 parent::setUp(); 12 12 remove_all_filters( 'session_token_manager' ); 13 $user_id = self::factory()->user->create();13 $user_id = self::factory()->user->create(); 14 14 $this->manager = WP_Session_Tokens::get_instance( $user_id ); 15 15 $this->assertInstanceOf( 'WP_Session_Tokens', $this->manager ); … … 19 19 function test_verify_and_destroy_token() { 20 20 $expiration = time() + DAY_IN_SECONDS; 21 $token = $this->manager->create( $expiration );21 $token = $this->manager->create( $expiration ); 22 22 $this->assertFalse( $this->manager->verify( 'foo' ) ); 23 23 $this->assertTrue( $this->manager->verify( $token ) ); … … 28 28 function test_destroy_other_tokens() { 29 29 $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 ); 33 33 $this->assertTrue( $this->manager->verify( $token_1 ) ); 34 34 $this->assertTrue( $this->manager->verify( $token_2 ) ); … … 42 42 function test_destroy_all_tokens() { 43 43 $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 ); 46 46 $this->assertTrue( $this->manager->verify( $token_1 ) ); 47 47 $this->assertTrue( $this->manager->verify( $token_2 ) );
Note: See TracChangeset
for help on using the changeset viewer.