Make WordPress Core


Ignore:
Timestamp:
09/18/2020 01:22:22 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Tests: Consistently use the expectException() method instead of the older @expectedException annotation.

See https://thephp.cc/news/2016/02/questioning-phpunit-best-practices

The method is available since PHPUnit 5.2, and WordPress currently supports PHPUnit 5.4 as the minimum version.

Follow-up to [48993].

See #51344.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/comment/wpAllowComment.php

    r48121 r48996  
    5353    }
    5454
    55     /**
    56      * @expectedException WPDieException
    57      */
    5855    public function test_die_as_duplicate_if_comment_author_name_and_emails_match() {
     56        $this->expectException( 'WPDieException' );
     57
    5958        $now          = time();
    6059        $comment_data = array(
Note: See TracChangeset for help on using the changeset viewer.