| @@ 89-95 (lines=7) @@ | ||
| 86 | $this->assertEquals($f->dataValue(), null); |
|
| 87 | } |
|
| 88 | ||
| 89 | public function testConstructorWithDateString() |
|
| 90 | { |
|
| 91 | $f = new DateField('Date', 'Date', '29/03/2003'); |
|
| 92 | $this->assertEquals(null, $f->dataValue()); |
|
| 93 | $f = new DateField('Date', 'Date', '2003-03-29 12:23:00'); |
|
| 94 | $this->assertEquals('2003-03-29', $f->dataValue()); |
|
| 95 | } |
|
| 96 | ||
| 97 | public function testSetValue() |
|
| 98 | { |
|
| @@ 68-75 (lines=8) @@ | ||
| 65 | $this->assertEquals('2003-03-29 23:59:38', $m->MyDatetime); |
|
| 66 | } |
|
| 67 | ||
| 68 | public function testDataValue() |
|
| 69 | { |
|
| 70 | $f = new DatetimeField('Datetime'); |
|
| 71 | $this->assertEquals(null, $f->dataValue(), 'Empty field'); |
|
| 72 | ||
| 73 | $f = new DatetimeField('Datetime', null, '2003-03-29 23:59:38'); |
|
| 74 | $this->assertEquals('2003-03-29 23:59:38', $f->dataValue(), 'From date/time string'); |
|
| 75 | } |
|
| 76 | ||
| 77 | public function testDataValueWithTimezone() |
|
| 78 | { |
|