public function testGetTimeReturnsTheExpectedTime() { $now = new \DateTime(); $this->connection->expects($this->once())->method('get')->with($this->basePath . '/time', false)->will($this->returnValue((object) array('time' => $now->format('U')))); $this->assertEquals($now, Client::getTime()); }