Make WordPress Core


Ignore:
Timestamp:
09/18/2020 01:48:27 PM (4 years 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/UpdatePlugin.php

    r48996 r48997  
    1313
    1414    public function test_missing_nonce() {
    15         $this->setExpectedException( 'WPAjaxDieStopException', '-1' );
     15        $this->expectException( 'WPAjaxDieStopException' );
     16        $this->expectExceptionMessage( '-1' );
    1617        $this->_handleAjax( 'update-plugin' );
    1718    }
Note: See TracChangeset for help on using the changeset viewer.