public function testDeleteOlder() { $captcha = CM_Captcha::create(); $id = $captcha->getId(); CMTest_TH::timeForward(200); CM_Captcha::deleteOlder(100); try { new CM_Captcha($id); $this->fail('Can construct old captcha'); } catch (CM_Exception_Nonexistent $e) { $this->assertTrue(true); } }
public function ajax_createNumber(CM_Params $params, CM_Frontend_JavascriptContainer_View $handler, CM_Http_Response_View_Ajax $response) { return CM_Captcha::create()->getId(); }