Ejemplo n.º 1
0
 /**
  * Tests if __toString() does not render the captcha question
  * when question rendering is turned off and the element is frozen.
  */
 public function test__toStringFrozenNoRender()
 {
     $this->nc = new HTML_QuickForm2_Element_Captcha_Numeral(null, null, array('captchaRender' => false));
     $this->nc->setSession(new HTML_QuickForm2_Element_Captcha_Session_Mock());
     $this->nc->toggleFrozen(true);
     $str = (string) $this->nc;
     //not empty string
     $this->assertEquals('', $str, 'Frozen string is not empty');
 }
Ejemplo n.º 2
0
 public function testGetType()
 {
     $tc = new HTML_QuickForm2_Element_Captcha_Numeral();
     $this->assertEquals('captcha', $tc->getType());
 }