Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/07/2016 04:55:04 PM (10 years ago)
Author:
imath
Message:

Post Type Activities: add unit tests and improve existing ones.

See #6482
Fixes #6128

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/testcases/activity/actions.php

    r9819 r10545  
    1010     */
    1111    public function test_bp_activity_catch_transition_post_type_status_publish() {
    12         $bp = buddypress();
    13 
    1412        register_post_type( 'foo', array(
    1513            'label'   => 'foo',
     
    2927
    3028        _unregister_post_type( 'foo' );
    31 
    32         // Reset globals
    33         unset( $bp->activity->actions->activity->new_foo );
    34         $bp->activity->track = array();
    3529    }
    3630
     
    4034     */
    4135    public function test_bp_activity_catch_transition_post_type_status_publish_to_publish() {
    42         $bp = buddypress();
    43 
    4436        register_post_type( 'foo', array(
    4537            'label'   => 'foo',
     
    6961
    7062        _unregister_post_type( 'foo' );
    71 
    72         // Reset globals
    73         unset( $bp->activity->actions->activity->new_foo );
    74         $bp->activity->track = array();
    7563    }
    7664
     
    8068     */
    8169    public function test_bp_activity_catch_transition_post_type_status_publish_password() {
    82         $bp = buddypress();
    83 
    8470        register_post_type( 'foo', array(
    8571            'label'   => 'foo',
     
    10793
    10894        _unregister_post_type( 'foo' );
    109 
    110         // Reset globals
    111         unset( $bp->activity->actions->activity->new_foo );
    112         $bp->activity->track = array();
    11395    }
    11496
     
    118100     */
    119101    public function test_bp_activity_catch_transition_post_type_status_publish_trash() {
    120         $bp = buddypress();
    121 
    122102        register_post_type( 'foo', array(
    123103            'label'   => 'foo',
     
    142122
    143123        _unregister_post_type( 'foo' );
    144 
    145         // Reset globals
    146         unset( $bp->activity->actions->activity->new_foo );
    147         $bp->activity->track = array();
    148124    }
    149125
Note: See TracChangeset for help on using the changeset viewer.