- Timestamp:
- 11/03/2017 07:44:10 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/core/class-bp-core-user.php
r9819 r11737 10 10 */ 11 11 public function test_get_users_with_exclude_querystring() { 12 $u1 = $this->factory->user->create();13 $u2 = $this->factory->user->create();14 $u3 = $this->factory->user->create();12 $u1 = self::factory()->user->create(); 13 $u2 = self::factory()->user->create(); 14 $u3 = self::factory()->user->create(); 15 15 16 16 $exclude_qs = $u1 . ',junkstring,' . $u3; … … 26 26 */ 27 27 public function test_get_users_with_exclude_array() { 28 $u1 = $this->factory->user->create();29 $u2 = $this->factory->user->create();30 $u3 = $this->factory->user->create();28 $u1 = self::factory()->user->create(); 29 $u2 = self::factory()->user->create(); 30 $u3 = self::factory()->user->create(); 31 31 32 32 $exclude_array = array( … … 46 46 */ 47 47 public function test_get_users_with_include_querystring() { 48 $u1 = $this->factory->user->create( array(48 $u1 = self::factory()->user->create( array( 49 49 'last_activity' => gmdate( 'Y-m-d H:i:s' ), 50 50 ) ); 51 $u2 = $this->factory->user->create( array(51 $u2 = self::factory()->user->create( array( 52 52 'last_activity' => gmdate( 'Y-m-d H:i:s', time() - 1000 ), 53 53 ) ); 54 $u3 = $this->factory->user->create( array(54 $u3 = self::factory()->user->create( array( 55 55 'last_activity' => gmdate( 'Y-m-d H:i:s', time() - 50 ), 56 56 ) ); … … 68 68 */ 69 69 public function test_get_users_with_include_array() { 70 $u1 = $this->factory->user->create( array(70 $u1 = self::factory()->user->create( array( 71 71 'last_activity' => gmdate( 'Y-m-d H:i:s' ), 72 72 ) ); 73 $u2 = $this->factory->user->create( array(73 $u2 = self::factory()->user->create( array( 74 74 'last_activity' => gmdate( 'Y-m-d H:i:s', time() - 1000 ), 75 75 ) ); 76 $u3 = $this->factory->user->create( array(76 $u3 = self::factory()->user->create( array( 77 77 'last_activity' => gmdate( 'Y-m-d H:i:s', time() - 50 ), 78 78 ) ); … … 100 100 */ 101 101 public function test_type_alphabetical() { 102 $u1 = $this->factory->user->create( array(102 $u1 = self::factory()->user->create( array( 103 103 'display_name' => 'foo', 104 104 ) ); 105 $u2 = $this->factory->user->create( array(105 $u2 = self::factory()->user->create( array( 106 106 'display_name' => 'bar', 107 107 ) ); … … 119 119 */ 120 120 public function test_get_users_by_letter() { 121 $u1 = $this->factory->user->create( array(121 $u1 = self::factory()->user->create( array( 122 122 'display_name' => 'foo', 123 123 ) ); 124 $u2 = $this->factory->user->create( array(124 $u2 = self::factory()->user->create( array( 125 125 'display_name' => 'bar', 126 126 ) ); … … 136 136 */ 137 137 public function test_search_users() { 138 $u1 = $this->factory->user->create( array(138 $u1 = self::factory()->user->create( array( 139 139 'display_name' => 'foo', 140 140 ) ); 141 $u2 = $this->factory->user->create( array(141 $u2 = self::factory()->user->create( array( 142 142 'display_name' => 'bar', 143 143 ) ); … … 150 150 151 151 public function test_get_specific_users() { 152 $u1 = $this->factory->user->create();153 $u2 = $this->factory->user->create();154 $u3 = $this->factory->user->create();152 $u1 = self::factory()->user->create(); 153 $u2 = self::factory()->user->create(); 154 $u3 = self::factory()->user->create(); 155 155 156 156 $include_array = array( … … 170 170 */ 171 171 public function test_get_last_activity() { 172 $u = $this->factory->user->create();172 $u = self::factory()->user->create(); 173 173 $time = bp_core_current_time(); 174 174 … … 186 186 */ 187 187 public function test_get_last_activity_store_in_cache() { 188 $u = $this->factory->user->create();188 $u = self::factory()->user->create(); 189 189 $time = bp_core_current_time(); 190 190 … … 204 204 */ 205 205 public function test_get_last_activity_store_in_cache_multiple_users() { 206 $u1 = $this->factory->user->create();207 $u2 = $this->factory->user->create();206 $u1 = self::factory()->user->create(); 207 $u2 = self::factory()->user->create(); 208 208 $time = bp_core_current_time(); 209 209 … … 225 225 */ 226 226 public function test_get_last_activity_from_cache_single_user() { 227 $u = $this->factory->user->create();227 $u = self::factory()->user->create(); 228 228 $time = bp_core_current_time(); 229 229 … … 248 248 */ 249 249 public function test_get_last_activity_in_cache_multiple_users() { 250 $u1 = $this->factory->user->create();251 $u2 = $this->factory->user->create();250 $u1 = self::factory()->user->create(); 251 $u2 = self::factory()->user->create(); 252 252 $time = bp_core_current_time(); 253 253 … … 273 273 */ 274 274 public function test_update_last_activity() { 275 $u = $this->factory->user->create();275 $u = self::factory()->user->create(); 276 276 $time = bp_core_current_time(); 277 277 $time2 = '1968-12-25 01:23:45'; … … 292 292 */ 293 293 public function test_delete_last_activity() { 294 $u = $this->factory->user->create();294 $u = self::factory()->user->create(); 295 295 $time = bp_core_current_time(); 296 296
Note: See TracChangeset
for help on using the changeset viewer.