Definition at line 25 of file DateFormatTest.php.
◆ setUp()
DateFormatTest::setUp |
( |
| ) |
|
◆ testDateFormatApplyTo()
DateFormatTest::testDateFormatApplyTo |
( |
| ) |
|
◆ testDateFormatApplyToWithTime()
DateFormatTest::testDateFormatApplyToWithTime |
( |
| ) |
|
Definition at line 84 of file DateFormatTest.php.
References $format.
88 ->day()->dot()->month()->dot()->year()
89 ->space()->hours12()->colon()->minutes()->space()->meridiem()
91 $this->assertEquals(
"05.04.1985 09:12 pm",
$format->applyTo($dt));
92 $this->assertEquals(
"05.04.1985 09:12 pm", $dt->format((
string)
$format));
93 $format = $this->df->custom()
94 ->day()->dot()->month()->dot()->year()
95 ->space()->hours24()->colon()->minutes()->colon()->seconds()
97 $this->assertEquals(
"05.04.1985 21:12:30", $format->applyTo($dt));
◆ testDateFormatBuilderAndGetters()
DateFormatTest::testDateFormatBuilderAndGetters |
( |
| ) |
|
Definition at line 41 of file DateFormatTest.php.
References $format.
44 '.',
',',
'-',
'/',
' ',
':',
'd',
'jS',
'l',
'D',
'W',
'm',
'F',
'M',
'Y',
'y',
'h',
'H',
'i',
's',
'a' 47 ->dot()->comma()->dash()->slash()->space()->colon()
48 ->day()->dayOrdinal()->weekday()->weekdayShort()
49 ->week()->month()->monthSpelled()->monthSpelledShort()
50 ->year()->twoDigitYear()
51 ->hours12()->hours24()->minutes()->seconds()->meridiem()
◆ testDateFormatExpand()
DateFormatTest::testDateFormatExpand |
( |
| ) |
|
◆ testDateFormatFactory()
DateFormatTest::testDateFormatFactory |
( |
| ) |
|
Definition at line 33 of file DateFormatTest.php.
35 $this->assertInstanceOf(
DateFormat\DateFormat::class, $this->df->standard());
36 $this->assertInstanceOf(
DateFormat\DateFormat::class, $this->df->germanShort());
37 $this->assertInstanceOf(
DateFormat\DateFormat::class, $this->df->germanLong());
38 $this->assertInstanceOf(
DateFormat\FormatBuilder::class, $this->df->custom());
◆ testDateFormatInvalidTokens()
DateFormatTest::testDateFormatInvalidTokens |
( |
| ) |
|
Definition at line 70 of file DateFormatTest.php.
72 $this->expectException(InvalidArgumentException::class);
73 new DateFormat\DateFormat([
'x',
'2']);
The documentation for this class was generated from the following file: