Make WordPress Core


Ignore:
Timestamp:
09/18/2020 01:22:22 PM (6 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/db.php

    r48979 r48996  
    525525        }
    526526
    527         /**
    528          * @expectedException WPDieException
    529          */
    530527        function test_bail() {
    531528                global $wpdb;
     529
     530                $this->expectException( 'WPDieException' );
    532531                $wpdb->bail( 'Database is dead.' );
    533532        }
Note: See TracChangeset for help on using the changeset viewer.