示例#1
0
 public function testSetFormatWithOptions()
 {
     $format = 'Y-m-d';
     $element = new DateTimeElement('foo');
     $element->setOptions(array('format' => $format));
     $this->assertSame($format, $element->getFormat());
 }
示例#2
0
 public function testUsesBrowserFormatByDefault()
 {
     $element = new DateTimeElement('foo');
     $this->assertEquals(DateTimeElement::DATETIME_FORMAT, $element->getFormat());
 }
示例#3
0
 public function testUsesRfc3339FormatByDefault()
 {
     $element = new DateTimeElement('foo');
     $this->assertEquals(DateTime::RFC3339, $element->getFormat());
 }