public function testServerTimeCreationAndGetters() { $data = json_decode(file_get_contents(STUB_PATH . '/servertime.json'), true); /** @var $item \CarlosIO\Pingdom\ServerTime */ $item = \CarlosIO\Pingdom\ServerTime::createFromArray($data); $this->assertSame(1294237910, $item->getServerTime()); }
/** * Returns a list of all server times for current account * * @throws \Exception * @return array<\CarlosIO\Pingdom\ServerTime> */ public function getServerTime($options = array()) { $response = $this->_callMethod('servertime', $options); $itemList = array($response); $result = array(); foreach ($itemList as $item) { $newItem = \CarlosIO\Pingdom\ServerTime::createFromArray($item); $newItem->setAccount($this); $result[] = $newItem; } return $result; }