DataStorageExtensionTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testGet() 0 12 1
A testHas() 0 7 1
1
<?php
2
3
namespace RDV\Bundle\MigrationBundle\Tests\Unit\Migration\Extension;
4
5
use RDV\Bundle\MigrationBundle\Migration\Extension\DataStorageExtension;
6
7
class DataStorageExtensionTest extends \PHPUnit_Framework_TestCase
8
{
9
    public function testGet()
10
    {
11
        $dataStorage = new DataStorageExtension();
12
        $dataStorage->set('test', ['test1' => 'test1']);
13
14
        $this->assertEquals(
15
            $dataStorage->get('test'),
16
            ['test1' => 'test1']
17
        );
18
19
        $this->assertTrue($dataStorage->has('test'));
20
    }
21
22
    public function testHas()
23
    {
24
        $dataStorage = new DataStorageExtension();
25
        $dataStorage->set('test', ['test1' => 'test1']);
26
27
        $this->assertTrue($dataStorage->has('test'));
28
    }
29
}
30