public function test_factory_CalendricalObject_null() { TestHelper::assertNullException($this, function () { DayOfWeek::from(null); }); }
/** * @dataProvider providerDayOfWeekData */ public function test_parseDayOfWeekText(Locale $locale, $pattern, $input, DayOfWeek $expected) { $formatter = $this->getPatternFormatter($pattern)->withLocale($locale); $pos = new ParsePosition(0); $this->assertEquals(DayOfWeek::from($formatter->parsePos($input, $pos)), $expected); $this->assertEquals($pos->getIndex(), strlen($input)); }