/** * 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)); }
/** * 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)); }