@@ 62-69 (lines=8) @@ | ||
59 | * @expectedException PHPUnit_Framework_Error_Deprecated |
|
60 | * @expectedExceptionMessage Deprecated in favor of splitting the start and end timestamps for a statement. Please use setStartTimestamp($format) or setEndTimestamp($format) instead. setTimestamp is now setStartTimestamp |
|
61 | */ |
|
62 | public function testDeprecatedTimestampAssesor() |
|
63 | { |
|
64 | $expected = time(); |
|
65 | $statement = new Statement(); |
|
66 | $statement->setTimestamp($expected); |
|
67 | ||
68 | $this->assertEquals($expected, $statement->getTimestamp()); |
|
69 | } |
|
70 | ||
71 | public function testTimestampAssesor() |
|
72 | { |
|
@@ 126-133 (lines=8) @@ | ||
123 | * @depends testTimestampAssesor |
|
124 | * @expectedException PHPUnit_Framework_Error_Deprecated |
|
125 | */ |
|
126 | public function testGetTimestampWithFormat() |
|
127 | { |
|
128 | $expected = '2012-01-01 12:00'; |
|
129 | $statement = new Statement(); |
|
130 | $statement->setTimestamp(strtotime($expected)); |
|
131 | ||
132 | $this->assertEquals($expected, $statement->getTimestamp('Y-m-d H:i')); |
|
133 | } |
|
134 | ||
135 | public function testJsonSerialization() |
|
136 | { |