/** * Test getting a none existing timeserver * * @return void */ public function testGetUnknownServer() { $server = new TimeSync\TimeSync(); $this->setExpectedException('Zend\\TimeSync\\Exception\\InvalidArgumentException'); $result = $server->getServer('none_existing_server_alias'); }
/** * Test getting a none existing timeserver * * @return void */ public function testGetUnknownServer() { $server = new TimeSync\TimeSync(); try { $result = $server->getServer('none_existing_server_alias'); $this->fail('Exception expected, because the requested timeserver does not exist'); } catch (TimeSync\Exception $e) { // success } }