IdGeneratorTest::testInterface()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 5
rs 9.4285
cc 1
eloc 3
nc 1
nop 0
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