Captcha = new CaptchaLib(); } public function tearDown() { parent::tearDown(); unset($this->Captcha); } public function testBuildHash() { $data = [ 'captcha_time' => time(), 'captcha' => '2' ]; $options = [ 'salt' => 'xyz', 'checkIp' => true, 'checkSession' => true ]; $res = CaptchaLib::buildHash($data, $options); //pr($res); $this->assertTrue(strlen($res) === 40); } }