Added Captcha library

This commit is contained in:
netkas 2024-10-24 15:23:28 -04:00
parent 5555e79327
commit d2eaa1fe73
3 changed files with 24 additions and 0 deletions

2
.idea/php.xml generated
View file

@ -12,6 +12,8 @@
</component>
<component name="PhpIncludePathManager">
<include_path>
<path value="/var/ncc/packages/com.symfony.finder=2.0.7" />
<path value="/var/ncc/packages/com.gregwar.captcha=v1.2.1" />
<path value="/var/ncc/packages/com.symfony.filesystem=v7.1.5" />
<path value="/var/ncc/packages/com.symfony.polyfill_ctype=v1.31.0" />
<path value="/var/ncc/packages/com.symfony.polyfill_mbstring=v1.31.0" />

View file

@ -44,6 +44,11 @@
"name": "net.nosial.optslib",
"version": "latest",
"source": "nosial/libs.opts=latest@n64"
},
{
"name": "com.gregwar.captcha",
"version": "latest",
"source": "gregwar/captcha=latest@packagist"
}
],
"configurations": [

View file

@ -0,0 +1,17 @@
<?php
namespace Socialbox\Other;
use Gregwar\Captcha\CaptchaBuilder;
use PHPUnit\Framework\TestCase;
class CaptchaTest extends TestCase
{
public function testCaptchaRendering()
{
$builder = new CaptchaBuilder("Foo Bar");
$builder->build();
$builder->save(__DIR__ . DIRECTORY_SEPARATOR . 'test.png');
}
}