IdGeneratorTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testInterface() 0 5 1
A testGeneration() 0 7 1
1
<?php
2
3
namespace Alawar\NginxPushStreamBundle\Tests\IdGenerator;
4
5
use Alawar\NginxPushStreamBundle\IdGenerator\IdGenerator;
6
7
class IdGeneratorTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function testInterface()
10
    {
11
        $generator = new IdGenerator();
12
        $this->assertInstanceOf("Alawar\\NginxPushStreamBundle\\IdGenerator\\IdGeneratorInterface", $generator);
13
    }
14
15
    public function testGeneration()
16
    {
17
        $generator = new IdGenerator();
18
        $id1 = $generator->generate();
19
        $id2 = $generator->generate();
20
        $this->assertNotEquals($id1, $id2);
21
    }
22
}
23