Make WordPress Core


Ignore:
Timestamp:
09/12/2024 09:39:41 PM (9 months ago)
Author:
SergeyBiryukov
Message:

Tests: Restore the environment before performing assertions in some canonical tests.

This aims to avoid affecting other tests in case of failure.

Follow-up to [28704], [45133].

See #61608.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/canonical/https.php

    r56547 r59017  
    6262        $redirect = redirect_canonical( $this->https, false );
    6363
     64        remove_filter( 'home_url', array( $this, 'set_https' ) );
     65
    6466        $this->assertNull( $redirect );
    65 
    66         remove_filter( 'home_url', array( $this, 'set_https' ) );
    6767    }
    6868}
Note: See TracChangeset for help on using the changeset viewer.