public function test_factory_CalendricalObject_null()
 {
     TestHelper::assertNullException($this, function () {
         DayOfWeek::from(null);
     });
 }
示例#2
0
 /**
  * @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));
 }