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

    r48937 r48996  
    102102    /**
    103103     * @ticket 23289
    104      * @expectedException WPDieException
    105104     */
    106105    function test_special_option_name_alloption() {
     106        $this->expectException( 'WPDieException' );
    107107        delete_option( 'alloptions' );
    108108    }
     
    110110    /**
    111111     * @ticket 23289
    112      * @expectedException WPDieException
    113112     */
    114113    function test_special_option_name_notoptions() {
     114        $this->expectException( 'WPDieException' );
    115115        delete_option( 'notoptions' );
    116116    }
Note: See TracChangeset for help on using the changeset viewer.