Redaxscript\Tests\Html\FormTest::testCaptcha PHP Метод

testCaptcha() публичный Метод

testCaptcha
С версии: 3.0.0
public testCaptcha ( array $expectArray = [] )
$expectArray array
    public function testCaptcha($expectArray = [])
    {
        /* setup */
        $form = new Html\Form($this->_registry, $this->_language);
        $form->init(null, ['captcha' => true]);
        $form->captcha($expectArray['type']);
        /* actual */
        $actual = $form->render();
        /* compare */
        $this->assertStringStartsWith($expectArray['start'], $actual);
        $this->assertStringEndsWith($expectArray['end'], $actual);
    }