Lines Matching refs:helper

22         $helper = new \helper_plugin_captcha();
25 $code = $helper->generateCaptchaCode("fixed", 0);
31 $helper = new \helper_plugin_captcha();
34 $secret = $helper->encrypt($rand);
36 $this->assertSame($rand, $helper->decrypt($secret));
38 $this->assertFalse($helper->decrypt(''));
39 $this->assertFalse($helper->decrypt('X'));
47 $helper = new \helper_plugin_captcha();
49 $INPUT->set($this->getInaccessibleProperty($helper, 'field_hp'), '');
50 $INPUT->set($this->getInaccessibleProperty($helper, 'field_in'), 'X');
51 $INPUT->set($this->getInaccessibleProperty($helper, 'field_sec'), '');
53 $this->assertFalse($helper->check(false));
54 $INPUT->set($this->getInaccessibleProperty($helper, 'field_sec'), 'X');
55 $this->assertFalse($helper->check(false));
59 $code = $helper->generateCaptchaCode($helper->fixedIdent(), $rand);
61 $cookie = new FileCookie($helper->fixedIdent(), $rand);
65 $INPUT->set($this->getInaccessibleProperty($helper, 'field_in'), $code);
66 $this->assertFalse($helper->check(false));
69 $INPUT->set($this->getInaccessibleProperty($helper, 'field_sec'), $helper->encrypt($rand));
70 $this->assertTrue($helper->check(false));
73 $this->assertFalse($helper->check(true));
78 $this->assertFalse($helper->check(false));
83 $helper = new \helper_plugin_captcha();
86 $code = $helper->generateCaptchaCode($helper->fixedIdent(), $rand);
87 $newcode = $helper->generateCaptchaCode($helper->fixedIdent() . 'X', $rand);
89 $newcode = $helper->generateCaptchaCode($helper->fixedIdent(), $rand + 0.1);
102 $helper = new \helper_plugin_captcha();