/** * @depends testReturnsPingResponse * @param PingResponse $response */ public function testPutsKeyTimeStampFromResponseInThePingResponseWithUTC(PingResponse $response) { $expected = new \DateTime("2013-04-20 21:40:02", new \DateTimeZone("UTC")); $this->assertEquals($expected, $response->getKeyTimeStamp()); }
public function testGetKeyTimeStamp() { $stamp = new \DateTime("-10 minutes"); $response = new PingResponse(new \DateTime(), null, $stamp); $this->assertSame($stamp, $response->getKeyTimeStamp()); }