From 3a7cf40aaa678bea1df143d2982d603b7a334eec Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Wed, 27 Nov 2019 15:27:18 +0100 Subject: Mode to modern phpunit Signed-off-by: Roeland Jago Douma --- tests/lib/DateTimeFormatterTest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/lib/DateTimeFormatterTest.php') diff --git a/tests/lib/DateTimeFormatterTest.php b/tests/lib/DateTimeFormatterTest.php index f7f6f6633cd..6cd8b572fcd 100644 --- a/tests/lib/DateTimeFormatterTest.php +++ b/tests/lib/DateTimeFormatterTest.php @@ -175,10 +175,10 @@ class DateTimeFormatterTest extends TestCase { $this->assertEquals($expected, (string) $this->formatter->formatDateTime($timestamp, 'long', 'long', $timeZone)); } - /** - * @expectedException \Exception - */ + function testFormatDateWithInvalidTZ() { + $this->expectException(\Exception::class); + $this->formatter->formatDate(1350129205, 'long', new \DateTimeZone('Mordor/Barad-dûr')); } } -- cgit v1.2.3