Ejemplo n.º 1
0
 public function captcha()
 {
     $captcha = new Zend\Captcha\Figlet(array('name' => 'foo', 'wordLen' => 6, 'timeout' => 300));
     $id = $captcha->generate();
     //this will output a Figlet string
     echo $captcha->getFiglet()->render($captcha->getWord());
 }
Ejemplo n.º 2
0
 public function testCaptchaShouldBeConfigurableViaConfigObject()
 {
     $options = array('name' => 'foo', 'sessionClass' => 'ZendTest\\Captcha\\TestAsset\\SessionContainer', 'wordLen' => 6, 'timeout' => 300);
     $config = new \Zend\Config\Config($options);
     $captcha = new \Zend\Captcha\Figlet($config);
     $test = $captcha->getOptions();
     $this->assertEquals($options, $test);
 }