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

    r48937 r48997  
    2626
    2727        // Make the request.
    28         $this->setExpectedException( 'WPAjaxDieStopException', '-1' );
     28        $this->expectException( 'WPAjaxDieStopException' );
     29        $this->expectExceptionMessage( '-1' );
    2930        $this->_handleAjax( 'wp-compression-test' );
    3031    }
     
    119120
    120121        // Make the request.
    121         $this->setExpectedException( 'WPAjaxDieStopException', '-1' );
     122        $this->expectException( 'WPAjaxDieStopException' );
     123        $this->expectExceptionMessage( '-1' );
    122124        $this->_handleAjax( 'wp-compression-test' );
    123125    }
Note: See TracChangeset for help on using the changeset viewer.