Since: 2.0.0
Author: Henry Ruhs
コード例 #1
0
ファイル: CaptchaTest.php プロジェクト: ITw3/redaxscript
 /**
  * testGetSolution
  *
  * @since 2.2.0
  */
 public function testGetSolution()
 {
     /* setup */
     $captcha = new Captcha($this->_language);
     /* result */
     $raw = $captcha->getSolution('raw');
     $hash = $captcha->getSolution('hash');
     /* compare */
     $this->assertEquals($hash, sha1($raw));
 }
コード例 #2
0
 /**
  * testMinus
  *
  * @since 2.2.0
  */
 public function testMinus()
 {
     /* setup */
     $captcha = new Captcha($this->_language);
     $captcha->init(3);
     /* actual */
     $actual = $captcha->getSolution();
     /* compare */
     $this->assertTrue(is_numeric($actual));
 }