Skip to:
Content

BuddyPress.org


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

    r12243 r12246  
    66 */
    77class BP_Tests_Core_Caps extends BP_UnitTestCase {
    8     /**
    9      * @expectedDeprecated wpmu_new_blog
    10      */
    118    public function test_bp_current_user_can_should_interpret_integer_second_param_as_a_blog_id() {
    129        if ( ! is_multisite() ) {
    1310            $this->markTestSkipped( __METHOD__ . ' requires multisite.' );
     11        }
     12
     13        if ( function_exists( 'wp_initialize_site' ) ) {
     14            $this->setExpectedDeprecated( 'wpmu_new_blog' );
    1415        }
    1516
     
    3031    /**
    3132     * @ticket BP6501
    32      * @expectedDeprecated wpmu_new_blog
    3333     */
    3434    public function test_bp_current_user_can_should_respect_blog_id_passed_in_args_array() {
    3535        if ( ! is_multisite() ) {
    3636            $this->markTestSkipped( __METHOD__ . ' requires multisite.' );
     37        }
     38
     39        if ( function_exists( 'wp_initialize_site' ) ) {
     40            $this->setExpectedDeprecated( 'wpmu_new_blog' );
    3741        }
    3842
Note: See TracChangeset for help on using the changeset viewer.