Changeset 8491 for trunk/tests/phpunit/testcases/activity/template.php
- Timestamp:
- 06/09/2014 06:33:05 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/activity/template.php
r8402 r8491 376 376 $activities_template = null; 377 377 } 378 379 /** 380 * @group bp_activity_has_more_items 381 */ 382 public function test_bp_activity_has_more_items_no_count_total_false() { 383 $a1 = $this->factory->activity->create(); 384 $a2 = $this->factory->activity->create(); 385 386 $args = array( 387 'count_total' => false, 388 ); 389 390 if ( bp_has_activities( $args ) ) { 391 global $activities_template; 392 $this->assertFalse( bp_activity_has_more_items() ); 393 $activities_template = null; 394 } 395 } 396 397 /** 398 * @group bp_activity_has_more_items 399 */ 400 public function test_bp_activity_has_more_items_no_count_total_true() { 401 $a1 = $this->factory->activity->create(); 402 $a2 = $this->factory->activity->create(); 403 $a3 = $this->factory->activity->create(); 404 $a4 = $this->factory->activity->create(); 405 406 $args = array( 407 'count_total' => false, 408 'per_page' => 2, 409 ); 410 411 if ( bp_has_activities( $args ) ) { 412 global $activities_template; 413 $this->assertTrue( bp_activity_has_more_items() ); 414 $activities_template = null; 415 } 416 } 417 418 /** 419 * @group bp_activity_has_more_items 420 */ 421 public function test_bp_activity_has_more_items_count_total_false() { 422 $a1 = $this->factory->activity->create(); 423 $a2 = $this->factory->activity->create(); 424 $a3 = $this->factory->activity->create(); 425 $a4 = $this->factory->activity->create(); 426 427 $args = array( 428 'count_total' => 'count_query', 429 ); 430 431 if ( bp_has_activities( $args ) ) { 432 global $activities_template; 433 $this->assertFalse( bp_activity_has_more_items() ); 434 $activities_template = null; 435 } 436 } 437 438 /** 439 * @group bp_activity_has_more_items 440 */ 441 public function test_bp_activity_has_more_items_count_total_true() { 442 $a1 = $this->factory->activity->create(); 443 $a2 = $this->factory->activity->create(); 444 $a3 = $this->factory->activity->create(); 445 $a4 = $this->factory->activity->create(); 446 447 $args = array( 448 'count_total' => 'count_query', 449 'per_page' => 2, 450 ); 451 452 if ( bp_has_activities( $args ) ) { 453 global $activities_template; 454 $this->assertTrue( bp_activity_has_more_items() ); 455 $activities_template = null; 456 } 457 } 378 458 }
Note:
See TracChangeset
for help on using the changeset viewer.