Changeset 11095 for trunk/tests/phpunit/testcases/groups/functions.php
- Timestamp:
- 09/13/2016 06:21:10 PM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/groups/functions.php
r11091 r11095 635 635 $this->assertEquals( 0, groups_get_invite_count_for_user( $u2 ) ); 636 636 } 637 638 /** 639 * @group hierarchical_groups 640 */ 641 public function test_update_orphaned_groups_on_group_delete_top_level() { 642 $g1 = $this->factory->group->create(); 643 $g2 = $this->factory->group->create( array( 644 'parent_id' => $g1, 645 ) ); 646 647 groups_delete_group( $g1 ); 648 649 $child = groups_get_group( array( 'group_id' => $g2 ) ); 650 $this->assertEquals( 0, $child->parent_id ); 651 } 652 653 /** 654 * @group hierarchical_groups 655 */ 656 public function test_update_orphaned_groups_on_group_delete_two_levels() { 657 $g1 = $this->factory->group->create(); 658 $g2 = $this->factory->group->create( array( 659 'parent_id' => $g1, 660 ) ); 661 $g3 = $this->factory->group->create( array( 662 'parent_id' => $g2, 663 ) ); 664 665 groups_delete_group( $g2 ); 666 667 $child = groups_get_group( array( 'group_id' => $g3 ) ); 668 $this->assertEquals( $g1, $child->parent_id ); 669 } 637 670 }
Note: See TracChangeset
for help on using the changeset viewer.