diff --git a/tests/phpunit/tests/locale.php b/tests/phpunit/tests/locale.php index a51df0a5b4..449471c5d5 100644 --- a/tests/phpunit/tests/locale.php +++ b/tests/phpunit/tests/locale.php @@ -25,10 +25,13 @@ class Tests_Locale extends WP_UnitTestCase { $this->assertSame( __( 'Saturday' ), $this->locale->get_weekday( 6 ) ); } - /** - * @expectedException PHPUnit_Framework_Error_Notice - */ public function test_get_weekday_undefined_index() { + if ( PHP_VERSION_ID >= 80000 ) { + $this->expectException( 'PHPUnit_Framework_Error_Warning' ); + } else { + $this->expectException( 'PHPUnit_Framework_Error_Notice' ); + } + $this->locale->get_weekday( 7 ); }