S2OJ/web/app/vendor/gregwar/captcha/tests/CaptchaBuilderTest.php
Baoshuo 2fcc71029e
All checks were successful
continuous-integration/drone/push Build is passing
chore(web): move gregwar/captcha
2022-10-08 19:58:22 +08:00

30 lines
568 B
PHP

<?php
namespace Test;
use Gregwar\Captcha\CaptchaBuilder;
use PHPUnit\Framework\TestCase;
class CaptchaBuilderTest extends TestCase
{
public function testDemo()
{
$captcha = new CaptchaBuilder();
$captcha
->build()
->save('out.jpg')
;
$this->assertTrue(file_exists(__DIR__.'/../out.jpg'));
}
public function testFingerPrint()
{
$int = count(CaptchaBuilder::create()
->build()
->getFingerprint()
);
$this->assertTrue(is_int($int));
}
}