assertEquals($result, $s->format($value, $format)); } public function testValidatesTimestampFormat() { $this->expectException(\UnexpectedValueException::class); $s = new TimestampShape([], new ShapeMap([])); $s->format('now', 'foo'); } public function testValidatesTimestampValue() { $this->expectException(\InvalidArgumentException::class); $s = new TimestampShape([], new ShapeMap([])); $s->format(true, 'iso8601'); } }