DataStorageExtensionTest::testHas()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %
Metric Value
dl 0
loc 7
rs 9.4285
cc 1
eloc 4
nc 1
nop 0
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