1
0
Fork 0
mirror of synced 2024-06-29 11:40:45 +12:00
appwrite/tests/unit/Database/Validator/UIDTest.php
2020-09-30 17:51:17 -04:00

31 lines
647 B
PHP

<?php
namespace Appwrite\Tests;
use Appwrite\Database\Validator\UID;
use PHPUnit\Framework\TestCase;
class UIDTest extends TestCase
{
/**
* @var UID
*/
protected $object = null;
public function setUp(): void
{
$this->object = new UID();
}
public function tearDown(): void
{
}
public function testValues()
{
$this->assertEquals($this->object->isValid('5f058a8925807'), true);
$this->assertEquals($this->object->isValid('5f058a89258075f058a89258075f058t'), true);
$this->assertEquals($this->object->isValid('5f058a89258075f058a89258075f058tx'), false);
}
}