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

    r48937 r48997  
    138138
    139139        // Make the request.
    140         $this->setExpectedException( 'WPAjaxDieStopException', '-1' );
     140        $this->expectException( 'WPAjaxDieStopException' );
     141        $this->expectExceptionMessage( '-1' );
    141142        $this->_handleAjax( 'delete-comment' );
    142143    }
     
    169170
    170171        // Make the request.
    171         $this->setExpectedException( 'WPAjaxDieStopException', '-1' );
     172        $this->expectException( 'WPAjaxDieStopException' );
     173        $this->expectExceptionMessage( '-1' );
    172174        $this->_handleAjax( 'delete-comment' );
    173175    }
Note: See TracChangeset for help on using the changeset viewer.