示例#1
0
 /**
  * Convert a string to DateTime
  *
  * @param string $value
  *
  * @return \DateTime
  *
  * @throws \Exception
  */
 protected function convertToDateTime($value)
 {
     return DateTimeParser::parse($value);
 }
示例#2
0
 /**
  * @dataProvider parseFailureProvider
  */
 public function testParseFailure($strDate, $exceptionMessage)
 {
     $this->setExpectedException('\\InvalidArgumentException', $exceptionMessage);
     DateTimeParser::parse($strDate);
 }