verify: add the verification of UUID

git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3624 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
2017-05-09 14:36:44 +00:00
parent 92202f6af1
commit 3471cb3d4b
2 changed files with 75 additions and 0 deletions

View File

@@ -119,4 +119,46 @@ class test_verify extends PHPUnit_Framework_TestCase
$res = \verify::staticIs_url ("http://valid");
$this->assertsame ($res, true);
}
////////////////
// OTHERS //
////////////////
public function test_is_UUID1 ()
{
$verify = new \verify ();
$res = $verify->is_UUID ("ca39275f-9224-425f-ba94-efce2aa5b52c");
$this->assertsame ($res, true);
}
public function test_is_UUID2 ()
{
$verify = new \verify ();
$res = $verify->is_UUID ("zz39275f-9224-425f-ba94-efce2aa5b52c");
$this->assertsame ($res, false);
}
public function test_is_UUID3 ()
{
$verify = new \verify ();
$res = $verify->is_UUID ("2c");
$this->assertsame ($res, false);
}
public function test_staticis_UUID1 ()
{
$res = \verify::staticis_UUID ("ca39275f-9224-425f-ba94-efce2aa5b52c");
$this->assertsame ($res, true);
}
public function test_staticis_UUID2 ()
{
$res = \verify::staticis_UUID ("zz39275f-9224-425f-ba94-efce2aa5b52c");
$this->assertsame ($res, false);
}
public function test_staticis_UUID3 ()
{
$res = \verify::staticis_UUID ("2c");
$this->assertsame ($res, false);
}
}