Exemplo n.º 1
0
 public function testProvidesInputSpecificationThatIncludesCaptchaAsValidator()
 {
     $element = new CaptchaElement();
     $captcha = new Captcha\Dumb(array('sessionClass' => 'ZendTest\\Captcha\\TestAsset\\SessionContainer'));
     $element->setCaptcha($captcha);
     $inputSpec = $element->getInputSpecification();
     $this->assertArrayHasKey('validators', $inputSpec);
     $this->assertInternalType('array', $inputSpec['validators']);
     $test = array_shift($inputSpec['validators']);
     $this->assertSame($captcha, $test);
 }