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/PrivacyExportPersonalData.php

    r47122 r48997  
    293293     */
    294294    public function test_failure_with_invalid_nonce() {
    295         $this->setExpectedException( 'WPAjaxDieStopException', '-1' );
     295        $this->expectException( 'WPAjaxDieStopException' );
     296        $this->expectExceptionMessage( '-1' );
    296297
    297298        $this->_make_ajax_call(
Note: See TracChangeset for help on using the changeset viewer.