Exemplo n.º 1
0
 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]']);
 }
Exemplo n.º 2
0
Arquivo: Date.php Projeto: Samshal/xsl
 /**
  * @return XsDateTime
  */
 public static function currentDateTime()
 {
     return XsDateTime::now();
 }
Exemplo n.º 3
0
 /**
  * @param $value
  * @return XsDateTime
  */
 public static function xsDateTime($value)
 {
     $value = XsDateTime::castToNodeValue($value);
     return XsDateTime::fromString($value);
 }