V4GuidGeneratorTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 14
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testGetGuid() 0 10 1
1
<?php
2
3
namespace Wikibase\DataModel\Services\Tests\Statement;
4
5
use PHPUnit\Framework\TestCase;
6
use Wikibase\DataModel\Services\Statement\V4GuidGenerator;
7
8
/**
9
 * @covers \Wikibase\DataModel\Services\Statement\V4GuidGenerator
10
 *
11
 * @license GPL-2.0-or-later
12
 * @author Addshore
13
 */
14
class V4GuidGeneratorTest extends TestCase {
15
16
	public function testGetGuid() {
17
		$guidGen = new V4GuidGenerator();
18
19
		$firstGuid = $guidGen->newGuid();
20
		$secondGuid = $guidGen->newGuid();
21
22
		$this->assertIsString( $firstGuid );
23
		$this->assertIsString( $secondGuid );
24
		$this->assertNotSame( $firstGuid, $secondGuid );
25
	}
26
27
}
28