Changeset 13980 for trunk/tests/phpunit/testcases/core/optouts.php
- Timestamp:
- 07/27/2024 04:30:23 PM (19 months ago)
- File:
-
- 1 edited
-
trunk/tests/phpunit/testcases/core/optouts.php (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/optouts.php
r12913 r13980 8 8 $old_current_user = get_current_user_id(); 9 9 10 $u1 = $this->factory->user->create();11 $this->set_current_user( $u1 );10 $u1 = self::factory()->user->create(); 11 self::set_current_user( $u1 ); 12 12 13 13 // Create a couple of optouts. … … 28 28 $this->assertEqualSets( array( $i1, $i2 ), $optouts ); 29 29 30 $this->set_current_user( $old_current_user );30 self::set_current_user( $old_current_user ); 31 31 } 32 32 … … 34 34 $old_current_user = get_current_user_id(); 35 35 36 $u1 = $this->factory->user->create();37 $this->set_current_user( $u1 );36 $u1 = self::factory()->user->create(); 37 self::set_current_user( $u1 ); 38 38 39 39 // Create an optouts. … … 48 48 $this->assertEquals( $i1, $i2 ); 49 49 50 $this->set_current_user( $old_current_user );50 self::set_current_user( $old_current_user ); 51 51 } 52 52 … … 54 54 $old_current_user = get_current_user_id(); 55 55 56 $u1 = $this->factory->user->create();57 $this->set_current_user( $u1 );56 $u1 = self::factory()->user->create(); 57 self::set_current_user( $u1 ); 58 58 59 59 $args = array( … … 72 72 $this->assertTrue( empty( $optouts ) ); 73 73 74 $this->set_current_user( $old_current_user );74 self::set_current_user( $old_current_user ); 75 75 } 76 76 … … 78 78 $old_current_user = get_current_user_id(); 79 79 80 $u1 = $this->factory->user->create();81 $this->set_current_user( $u1 );80 $u1 = self::factory()->user->create(); 81 self::set_current_user( $u1 ); 82 82 83 83 // Create a couple of optouts. … … 98 98 $this->assertEqualSets( array( $i1 ), $optouts ); 99 99 100 $this->set_current_user( $old_current_user );100 self::set_current_user( $old_current_user ); 101 101 } 102 102 … … 104 104 $old_current_user = get_current_user_id(); 105 105 106 $u1 = $this->factory->user->create();107 $this->set_current_user( $u1 );106 $u1 = self::factory()->user->create(); 107 self::set_current_user( $u1 ); 108 108 109 109 // Create a couple of optouts. … … 124 124 $this->assertEqualSets( array( $i1 ), $optouts ); 125 125 126 $this->set_current_user( $old_current_user );126 self::set_current_user( $old_current_user ); 127 127 } 128 128 … … 130 130 $old_current_user = get_current_user_id(); 131 131 132 $u1 = $this->factory->user->create();133 $this->set_current_user( $u1 );132 $u1 = self::factory()->user->create(); 133 self::set_current_user( $u1 ); 134 134 135 135 // Create a couple of optouts. … … 150 150 $this->assertEqualSets( array( $i1 ), $optouts ); 151 151 152 $this->set_current_user( $old_current_user );152 self::set_current_user( $old_current_user ); 153 153 } 154 154 … … 157 157 $old_current_user = get_current_user_id(); 158 158 159 $u1 = $this->factory->user->create();160 $this->set_current_user( $u1 );159 $u1 = self::factory()->user->create(); 160 self::set_current_user( $u1 ); 161 161 162 162 // Create an opt-out. … … 179 179 $this->assertEqualSets( array( $i1 ), $optouts ); 180 180 181 $this->set_current_user( $old_current_user );181 self::set_current_user( $old_current_user ); 182 182 } 183 183 … … 185 185 $old_current_user = get_current_user_id(); 186 186 187 $u1 = $this->factory->user->create();188 $this->set_current_user( $u1 );187 $u1 = self::factory()->user->create(); 188 self::set_current_user( $u1 ); 189 189 // Create an opt-out. 190 190 $args = array( … … 199 199 200 200 $this->assertTrue( is_wp_error( $email->validate() ) ); 201 $this->set_current_user( $old_current_user ); 202 } 203 201 self::set_current_user( $old_current_user ); 202 } 204 203 }
Note: See TracChangeset
for help on using the changeset viewer.