public function testClearCaptchaSession() { $ses = $this->getMock('HTML_QuickForm2_Element_Captcha_Session_Mock', array('clear')); $ses->expects($this->once('clear'))->method('clear'); $tc = new HTML_QuickForm2_Element_Captcha_Numeral(); $tc->setSession($ses); $tc->clearCaptchaSession(); }