Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Removing the separator between the hidden and the visible inputs. As the... #3025

Closed
wants to merge 2 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+10 −2
Split
@@ -130,9 +130,8 @@ protected function renderCaptchaInputs(ElementInterface $element)
$hidden = $this->renderCaptchaHidden($captcha, $attributes);
$input = $this->renderCaptchaInput($captcha, $attributes);
- $separator = $this->getSeparator();
- return $hidden . $separator . $input;
+ return $hidden . $input;
}
/**
@@ -92,4 +92,13 @@ public function testSetSeparator()
$this->assertEquals('-', $this->helper->getSeparator());
}
+
+ public function testRenderSeparatorOneTimeAfterText()
+ {
+ $element = $this->getElement();
+ $this->helper->setSeparator('<br />');
+ $markup = $this->helper->render($element);
+ $this->assertContains($this->captcha->getLabel() . ' <b>' . strrev($this->captcha->getWord()) . '</b>' . $this->helper->getSeparator() . '<input name="foo[id]" type="hidden"', $markup);
+ $this->assertNotContains($this->helper->getSeparator() . '<input name="foo[input]" type="text"', $markup);
+ }
}