Changeset 8787 for trunk/tests/phpunit/testcases/activity/template.php
- Timestamp:
- 08/11/2014 03:13:23 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/activity/template.php
r8747 r8787 513 513 } 514 514 } 515 516 /** 517 * Integration test for 'date_query' param 518 * 519 * @group date_query 520 */ 521 function test_bp_has_activities_with_date_query() { 522 if ( ! class_exists( 'WP_Date_Query' ) ) { 523 return; 524 } 525 526 $a1 = $this->factory->activity->create(); 527 $a2 = $this->factory->activity->create( array( 528 'recorded_time' => '2001-01-01 12:00' 529 ) ); 530 $a3 = $this->factory->activity->create( array( 531 'recorded_time' => '2005-01-01 12:00' 532 ) ); 533 534 global $activities_template; 535 bp_has_activities( array( 536 'date_query' => array( array( 537 'after' => '1 day ago' 538 ) ) 539 ) ); 540 541 $ids = wp_list_pluck( $activities_template->activities, 'id' ); 542 $this->assertEquals( $ids, array( $a1 ) ); 543 } 515 544 }
Note: See TracChangeset
for help on using the changeset viewer.