Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/05/2018 05:24:17 PM (6 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/activity/functions.php

    r12245 r12246  
    805805     * @group bp_activity_format_activity_action_custom_post_type_post_ms
    806806     * @group activity_tracking
    807      * @expectedDeprecated wpmu_new_blog
    808807     */
    809808    public function test_bp_activity_format_activity_action_custom_post_type_post_ms() {
    810809        if ( ! is_multisite() ) {
    811810            $this->markTestSkipped();
     811        }
     812
     813        if ( function_exists( 'wp_initialize_site' ) ) {
     814            $this->setExpectedDeprecated( 'wpmu_new_blog' );
    812815        }
    813816
     
    918921     * @group bp_activity_format_activity_action_custom_post_type_post_ms
    919922     * @group activity_tracking
    920      * @expectedDeprecated wpmu_new_blog
    921923     */
    922924    public function test_bp_activity_format_activity_action_custom_string_post_type_post_ms() {
    923925        if ( ! is_multisite() ) {
    924926            $this->markTestSkipped();
     927        }
     928
     929        if ( function_exists( 'wp_initialize_site' ) ) {
     930            $this->setExpectedDeprecated( 'wpmu_new_blog' );
    925931        }
    926932
     
    10561062    public function test_bp_activity_format_activity_action_custom_post_type_comment() {
    10571063        if ( is_multisite() ) {
    1058             $this->setExpectedDeprecated( 'wpmu_new_blog' );
     1064            if ( function_exists( 'wp_initialize_site' ) ) {
     1065                $this->setExpectedDeprecated( 'wpmu_new_blog' );
     1066            }
     1067
    10591068            $b = self::factory()->blog->create();
    10601069            switch_to_blog( $b );
Note: See TracChangeset for help on using the changeset viewer.