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()); }
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); }