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

    r48937 r48997  
    131131
    132132        // Make the request.
    133         $this->setExpectedException( 'WPAjaxDieStopException', '-1' );
     133        $this->expectException( 'WPAjaxDieStopException' );
     134        $this->expectExceptionMessage( '-1' );
    134135        $this->_handleAjax( 'dim-comment' );
    135136    }
     
    159160
    160161        // Make the request.
    161         $this->setExpectedException( 'WPAjaxDieStopException', '-1' );
     162        $this->expectException( 'WPAjaxDieStopException' );
     163        $this->expectExceptionMessage( '-1' );
    162164        $this->_handleAjax( 'dim-comment' );
    163165    }
Note: See TracChangeset for help on using the changeset viewer.