private function applyHeader(RequestInterface $request, $name, Shape $member, $value) { if ($member->getType() == 'timestamp') { $value = TimestampShape::format($value, 'rfc822'); } $request->setHeader($member['locationName'] ?: $name, $value); }
/** * @expectedException \InvalidArgumentException */ public function testValidatesTimestampValue() { $s = new TimestampShape([], new ShapeMap([])); $s->format(true, 'iso8601'); }