Index: tests/Zend/Form/Element/CaptchaTest.php =================================================================== --- tests/Zend/Form/Element/CaptchaTest.php (revision 24717) +++ tests/Zend/Form/Element/CaptchaTest.php (working copy) @@ -105,6 +105,28 @@ } /** + * @group ZF-12161 + */ + public function testSettingCustomCaptchaAdapterPerConstructor() + { + $element = new Zend_Form_Element_Captcha( + 'foo', + array( + 'prefixPath' => array( + 'prefix' => 'Zend_Form_Element_CaptchaTest', + 'path' => dirname(__FILE__) . '/_files', + ), + 'captcha' => 'Foo', + ) + ); + + $this->assertInstanceOf( + 'Zend_Form_Element_CaptchaTest_Captcha_Foo', + $element->getCaptcha() + ); + } + + /** * @see ZF-4038 * @group ZF-4038 */ Index: tests/Zend/Form/Element/_files/Captcha/Foo.php =================================================================== --- tests/Zend/Form/Element/_files/Captcha/Foo.php (revision 0) +++ tests/Zend/Form/Element/_files/Captcha/Foo.php (revision 0) @@ -0,0 +1,33 @@ +