WordPress.org

Make WordPress Core


Ignore:
Timestamp:
09/18/2020 01:48:27 PM (7 months ago)
Author:
SergeyBiryukov
Message:

Tests: Switch Ajax tests to use the expectException() method directly, instead of the WP_UnitTestCase_Base::setExpectedException() wrapper.

This brings some consistency with other tests.

Follow-up to [48996].

See #51344.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/ajax/PrivacyErasePersonalData.php

    r48100 r48997  
    332332     */
    333333    public function test_failure_with_invalid_nonce() {
    334         $this->setExpectedException( 'WPAjaxDieStopException', '-1' );
     334        $this->expectException( 'WPAjaxDieStopException' );
     335        $this->expectExceptionMessage( '-1' );
    335336
    336337        $this->_make_ajax_call(
Note: See TracChangeset for help on using the changeset viewer.