Changeset 12112 for trunk/tests/phpunit/testcases/activity/functions.php
- Timestamp:
- 05/23/2018 02:37:41 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/testcases/activity/functions.php
r11806 r12112 1608 1608 } 1609 1609 } 1610 1611 /** 1612 * @ticket BP7818 1613 * @ticket BP7698 1614 */ 1615 public function test_bp_activity_personal_data_exporter() { 1616 $u = self::factory()->user->create(); 1617 1618 $a1 = self::factory()->activity->create( 1619 array( 1620 'user_id' => $u, 1621 'component' => 'activity', 1622 'type' => 'activity_update', 1623 ) 1624 ); 1625 1626 $a2 = self::factory()->activity->create( 1627 array( 1628 'user_id' => $u, 1629 'component' => 'activity', 1630 'type' => 'activity_comment', 1631 'item_id' => $a1, 1632 'secondary_item_id' => $a1, 1633 ) 1634 ); 1635 1636 $g = self::factory()->group->create( 1637 array( 1638 'name' => 'My Cool Group', 1639 ) 1640 ); 1641 1642 $a3 = self::factory()->activity->create( 1643 array( 1644 'user_id' => $u, 1645 'component' => 'groups', 1646 'type' => 'activity_update', 1647 'item_id' => $g, 1648 ) 1649 ); 1650 1651 $test_user = new WP_User( $u ); 1652 1653 $actual = bp_activity_personal_data_exporter( $test_user->user_email, 1 ); 1654 1655 $this->assertTrue( $actual['done'] ); 1656 1657 // Number of exported activity items. 1658 $this->assertSame( 3, count( $actual['data'] ) ); 1659 } 1610 1660 }
Note: See TracChangeset
for help on using the changeset viewer.