Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/05/2018 05:24:17 PM (8 years ago)
Author:
boonebgorges
Message:

Tests: Move wpmu_new_blog and delete_blog expectedDeprecated calls into test logic.

Use of the @expectedDeprecated annotation means that the deprecation notice is
expected across all versions of WordPress, while we in fact need to suppress the
notices only on WP 5.0+.

See #7984.

File:
1 edited

Legend:

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

    r12244 r12246  
    2424     * @group activity_action
    2525     * @group bp_blogs_format_activity_action_new_blog
    26      * @expectedDeprecated wpmu_new_blog
    2726     */
    2827    public function test_bp_blogs_format_activity_action_new_blog() {
    2928        if ( ! is_multisite() ) {
    3029            $this->markTestSkipped();
     30        }
     31
     32        if ( function_exists( 'wp_initialize_site' ) ) {
     33            $this->setExpectedDeprecated( 'wpmu_new_blog' );
    3134        }
    3235
     
    118121     * @group activity_action
    119122     * @group bp_blogs_format_activity_action_new_blog_post
    120      * @expectedDeprecated wpmu_new_blog
    121123     */
    122124    public function test_bp_blogs_format_activity_action_new_blog_post_ms_nonrootblog() {
    123125        if ( ! is_multisite() ) {
    124126            $this->markTestSkipped();
     127        }
     128
     129        if ( function_exists( 'wp_initialize_site' ) ) {
     130            $this->setExpectedDeprecated( 'wpmu_new_blog' );
    125131        }
    126132
     
    160166     * @group bp_blogs_format_activity_action_new_blog_comment
    161167     * @group post_type_comment_activities
    162      * @expectedDeprecated wpmu_new_blog
    163168     */
    164169    public function test_bp_blogs_format_activity_action_new_blog_comment_ms_nonrootblog() {
    165170        if ( ! is_multisite() ) {
    166171            $this->markTestSkipped();
     172        }
     173
     174        if ( function_exists( 'wp_initialize_site' ) ) {
     175            $this->setExpectedDeprecated( 'wpmu_new_blog' );
    167176        }
    168177
     
    204213    /**
    205214     * @group bp_blogs_format_activity_action_new_blog
    206      * @expectedDeprecated wpmu_new_blog
    207215     */
    208216    public function test_bp_activity_format_activity_action_new_blog_backpat() {
    209217        if ( ! is_multisite() ) {
    210218            $this->markTestSkipped();
     219        }
     220
     221        if ( function_exists( 'wp_initialize_site' ) ) {
     222            $this->setExpectedDeprecated( 'wpmu_new_blog' );
    211223        }
    212224
     
    233245    /**
    234246     * @group bp_blogs_format_activity_action_new_blog_post
    235      * @expectedDeprecated wpmu_new_blog
    236247     */
    237248    public function test_bp_activity_format_activity_action_new_blog_post_backpat() {
    238249        if ( ! is_multisite() ) {
    239250            $this->markTestSkipped();
     251        }
     252
     253        if ( function_exists( 'wp_initialize_site' ) ) {
     254            $this->setExpectedDeprecated( 'wpmu_new_blog' );
    240255        }
    241256
     
    262277    /**
    263278     * @group bp_blogs_format_activity_action_new_blog_comment
    264      * @expectedDeprecated wpmu_new_blog
    265279     */
    266280    public function test_bp_activity_format_activity_action_new_blog_comment_backpat() {
    267281        if ( ! is_multisite() ) {
    268282            $this->markTestSkipped();
     283        }
     284
     285        if ( function_exists( 'wp_initialize_site' ) ) {
     286            $this->setExpectedDeprecated( 'wpmu_new_blog' );
    269287        }
    270288
Note: See TracChangeset for help on using the changeset viewer.