1
0
Fork 0
mirror of synced 2024-07-03 13:41:01 +12:00
appwrite/tests/unit/Database/Validator/UIDTest.php

31 lines
647 B
PHP
Raw Normal View History

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