Changeset 9139 for trunk/tests/phpunit/testcases/friends/functions.php
- Timestamp:
- 11/14/2014 02:01:18 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/friends/functions.php
r8958 r9139 13 13 */ 14 14 public function test_requests_on_accept() { 15 $u1 = $this-> create_user();16 $u2 = $this-> create_user();17 $u3 = $this-> create_user();15 $u1 = $this->factory->user->create(); 16 $u2 = $this->factory->user->create(); 17 $u3 = $this->factory->user->create(); 18 18 19 19 // request friendship … … 42 42 */ 43 43 public function test_requests_on_request() { 44 $u1 = $this-> create_user();45 $u2 = $this-> create_user();46 $u3 = $this-> create_user();44 $u1 = $this->factory->user->create(); 45 $u2 = $this->factory->user->create(); 46 $u3 = $this->factory->user->create(); 47 47 48 48 // request friendship … … 67 67 */ 68 68 public function test_requests_on_withdraw() { 69 $u1 = $this-> create_user();70 $u2 = $this-> create_user();69 $u1 = $this->factory->user->create(); 70 $u2 = $this->factory->user->create(); 71 71 72 72 // request friendship … … 95 95 */ 96 96 public function test_requests_on_reject() { 97 $u1 = $this-> create_user();98 $u2 = $this-> create_user();97 $u1 = $this->factory->user->create(); 98 $u2 = $this->factory->user->create(); 99 99 100 100 // request friendship … … 121 121 */ 122 122 public function test_friends_add_friend_fail_on_self() { 123 $u1 = $this-> create_user();123 $u1 = $this->factory->user->create(); 124 124 $this->assertFalse( friends_add_friend( $u1, $u1 ) ); 125 125 } … … 129 129 */ 130 130 public function test_friends_add_friend_already_friends() { 131 $u1 = $this-> create_user();132 $u2 = $this-> create_user();131 $u1 = $this->factory->user->create(); 132 $u2 = $this->factory->user->create(); 133 133 134 134 friends_add_friend( $u1, $u2, true ); … … 142 142 public function test_friends_check_friendship_status_in_members_loop() { 143 143 $now = time(); 144 $u1 = $this-> create_user( array(144 $u1 = $this->factory->user->create( array( 145 145 'last_activity' => date( 'Y-m-d H:i:s', $now ), 146 146 ) ); 147 $u2 = $this-> create_user( array(147 $u2 = $this->factory->user->create( array( 148 148 'last_activity' => date( 'Y-m-d H:i:s', $now - 100 ), 149 149 ) ); 150 $u3 = $this-> create_user( array(150 $u3 = $this->factory->user->create( array( 151 151 'last_activity' => date( 'Y-m-d H:i:s', $now - 200 ), 152 152 ) ); 153 $u4 = $this-> create_user( array(153 $u4 = $this->factory->user->create( array( 154 154 'last_activity' => date( 'Y-m-d H:i:s', $now - 300 ), 155 155 ) ); 156 $u5 = $this-> create_user( array(156 $u5 = $this->factory->user->create( array( 157 157 'last_activity' => date( 'Y-m-d H:i:s', $now - 400 ), 158 158 ) ); … … 190 190 public function test_friends_check_friendship_status_not_in_members_loop() { 191 191 $now = time(); 192 $u1 = $this-> create_user( array(192 $u1 = $this->factory->user->create( array( 193 193 'last_activity' => date( 'Y-m-d H:i:s', $now ), 194 194 ) ); 195 $u2 = $this-> create_user( array(195 $u2 = $this->factory->user->create( array( 196 196 'last_activity' => date( 'Y-m-d H:i:s', $now - 100 ), 197 197 ) ); 198 $u3 = $this-> create_user( array(198 $u3 = $this->factory->user->create( array( 199 199 'last_activity' => date( 'Y-m-d H:i:s', $now - 200 ), 200 200 ) ); 201 $u4 = $this-> create_user( array(201 $u4 = $this->factory->user->create( array( 202 202 'last_activity' => date( 'Y-m-d H:i:s', $now - 300 ), 203 203 ) ); 204 $u5 = $this-> create_user( array(204 $u5 = $this->factory->user->create( array( 205 205 'last_activity' => date( 'Y-m-d H:i:s', $now - 400 ), 206 206 ) );
Note: See TracChangeset
for help on using the changeset viewer.