Skip to:
Content

BuddyPress.org

Ticket #3794: 3794.unittest.patch

File 3794.unittest.patch, 807 bytes (added by imath, 5 years ago)
  • tests/phpunit/testcases/activity/functions.php

    diff --git tests/phpunit/testcases/activity/functions.php tests/phpunit/testcases/activity/functions.php
    index c6e09ac..1e1690c 100644
    Bar!'; 
    765765        }
    766766
    767767        /**
     768         * @group favorites
     769         * @group BP3794
     770         */
     771        public function test_count_user_favorite_after_activity_removed() {
     772                $u1 = $this->create_user();
     773                $a = $this->factory->activity->create();
     774
     775                // favorite activity
     776                bp_activity_add_user_favorite( $a, $u1 );
     777
     778                // Delete the activity
     779                bp_activity_delete_by_activity_id( $a );
     780
     781                $this->assertEquals( 0, bp_activity_total_favorites_for_user( $u1 ) );
     782        }
     783
     784        /**
    768785         * @group bp_activity_post_update
    769786         */
    770787        public function test_bp_activity_post_update_empty_content() {