ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
UUIDUtilTest.php
Go to the documentation of this file.
1<?php
2
3namespace Sabre\VObject;
4
5use PHPUnit\Framework\TestCase;
6
7class UUIDUtilTest extends TestCase {
8
9 function testValidateUUID() {
10
11 $this->assertTrue(
12 UUIDUtil::validateUUID('11111111-2222-3333-4444-555555555555')
13 );
14 $this->assertFalse(
15 UUIDUtil::validateUUID(' 11111111-2222-3333-4444-555555555555')
16 );
17 $this->assertTrue(
18 UUIDUtil::validateUUID('ffffffff-2222-3333-4444-555555555555')
19 );
20 $this->assertFalse(
21 UUIDUtil::validateUUID('fffffffg-2222-3333-4444-555555555555')
22 );
23
24 }
25
29 function testGetUUID() {
30
31 $this->assertTrue(
34 )
35 );
36
37 }
38
39}
An exception for terminatinating execution or to throw for unit testing.
testGetUUID()
@depends testValidateUUID
static validateUUID($uuid)
Checks if a string is a valid UUID.
Definition: UUIDUtil.php:60
static getUUID()
Returns a pseudo-random v4 UUID.
Definition: UUIDUtil.php:27