public function testInvalidSequence() { $this->setExpectedException(InvalidArgumentException::class, 'Expected a http://www.w3.org/2001/XMLSchema:dateTime object, got xs:item'); $xsDateTime = XsDateTime::fromString('2015-10-16 15:37:00'); $this->transformFile('Stubs/Xsl/Formatting/format-invalid-sequence.xsl', ['dateTime' => (string) $xsDateTime, 'picture' => '[Y]']); }
/** * @param $value * @return XsDateTime */ public static function xsDateTime($value) { $value = XsDateTime::castToNodeValue($value); return XsDateTime::fromString($value); }