- Timestamp:
- 02/21/2014 02:49:28 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/testcases/activity/class.BP_Activity_Activity.php
r7922 r7951 258 258 259 259 /** 260 * @group get 261 */ 262 public function test_get_with_offset() { 263 $now = time(); 264 $a1 = $this->factory->activity->create( array( 265 'content' => 'Life Rules', 266 'recorded_time' => date( 'Y-m-d H:i:s', $now - 100 ), 267 ) ); 268 $a2 = $this->factory->activity->create( array( 269 'content' => 'Life Drools', 270 'recorded_time' => date( 'Y-m-d H:i:s', $now - 50 ), 271 ) ); 272 $a3 = $this->factory->activity->create( array( 273 'content' => 'Life Drools', 274 'recorded_time' => date( 'Y-m-d H:i:s', $now - 10 ), 275 ) ); 276 277 $activity = BP_Activity_Activity::get( array( 278 'filter' => array( 279 'offset' => $a2, 280 ), 281 ) ); 282 $ids = wp_list_pluck( $activity['activities'], 'id' ); 283 $this->assertEquals( array( $a3, $a2 ), $ids ); 284 } 285 /** 260 286 * @group get_id 261 287 */
Note: See TracChangeset
for help on using the changeset viewer.