You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
568 B
PHP
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));
|
|
}
|
|
} |