Files
swiftadmin/vendor/webman/captcha/tests/CaptchaBuilderTest.php

30 lines
567 B
PHP
Raw Normal View History

2022-08-19 19:48:37 +08:00
<?php
namespace Test;
2023-04-25 20:11:49 +08:00
use Webman\Captcha\CaptchaBuilder;
2022-08-19 19:48:37 +08:00
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));
}
}