/** * Test marking a none existing timeserver as current * * @return void */ public function testSetUnknownCurrent() { $server = new TimeSync\TimeSync(); $this->setExpectedException('Zend\\TimeSync\\Exception\\InvalidArgumentException'); $server->setServer('unkown_alias'); }
/** * Test marking a none existing timeserver as current * * @return void */ public function testSetUnknownCurrent() { $server = new TimeSync\TimeSync(); try { $server->setServer('unkown_alias'); $this->fail('Exception expected because there is no timeserver which we can mark as current'); } catch (TimeSync\Exception $e) { // success } }