- Timestamp:
- 02/27/2015 03:00:42 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/activity/class.BP_Activity_Activity.php
r9139 r9561 4 4 */ 5 5 class BP_Tests_Activity_Class extends BP_UnitTestCase { 6 protected $old_current_user = 0;7 8 public function setUp() {9 parent::setUp();10 11 $this->old_current_user = get_current_user_id();12 $this->set_current_user( $this->factory->user->create( array(13 'role' => 'subscriber',14 ) ) );15 }16 17 public function tearDown() {18 parent::tearDown();19 $this->set_current_user( $this->old_current_user );20 }21 6 22 7 /** … … 259 244 */ 260 245 public function test_get_with_display_comments_threaded() { 246 $u = $this->factory->user->create(); 247 261 248 $now = time(); 262 249 $a1 = $this->factory->activity->create( array( 250 'user_id' => $u, 263 251 'content' => 'Life Rules', 264 252 'recorded_time' => date( 'Y-m-d H:i:s', $now ), 265 253 ) ); 266 254 $a2 = $this->factory->activity->create( array( 255 'user_id' => $u, 267 256 'content' => 'Life Drools', 268 257 'recorded_time' => date( 'Y-m-d H:i:s', $now - 100 ), 269 258 ) ); 270 259 $a3 = bp_activity_new_comment( array( 260 'user_id' => $u, 271 261 'activity_id' => $a1, 272 262 'content' => 'Candy is good',
Note: See TracChangeset
for help on using the changeset viewer.