We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 470d4a2 commit f7d8943Copy full SHA for f7d8943
tests/Api/ApiElementTest.php
@@ -185,9 +185,13 @@ public function testDateTimeElements()
185
$actual = $dateElement->cast('20191030');
186
static::assertSame('2019-10-30', $actual->format('Y-m-d'));
187
188
+ $dateElement = new Element(Element::TYPE_DATE, 'Cf8FwZZe');
189
+ $actual = $dateElement->cast('00000000');
190
+ static::assertNull($actual);
191
+
192
$timeElement = new Element(Element::TYPE_TIME, 'Ma0NRVdj');
193
$actual = $timeElement->cast('102030');
- static::assertSame('10:20:30', $actual->format('H:i:s'));
194
+ static::assertSame('10:20:30', $actual->format('%H:%I:%S'));
195
196
$timestampElement = new Element(Element::TYPE_TIMESTAMP, '2SNTkpDJ');
197
$actual = $timestampElement->cast('20191030102030');
0 commit comments