Completed
Branch master (1820a0)
by Oss
02:45
created

ColumnPathTest   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 2
dl 0
loc 37
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Test\Brownie\BpmOnline\DataService\Column\Expression;
4
5
use Brownie\BpmOnline\DataService\Column\Expression\ColumnPath;
6
use PHPUnit\Framework\TestCase;
7
8
class ColumnPathTest extends TestCase
9
{
10
11
    /**
12
     * @var ColumnPath
13
     */
14
    private $columnPath;
15
16
    protected function setUp()
17
    {
18
        $this->columnPath = new ColumnPath('[Name].id');
19
    }
20
21
    protected function tearDown()
22
    {
23
        $this->columnPath = null;
24
    }
25
26
    public function testGetKeyName()
27
    {
28
        $this->assertEquals('ColumnPath', $this->columnPath->getKeyName());
29
    }
30
31
    public function testSetGetValue()
32
    {
33
        $this->assertEquals('[Name].id', $this->columnPath->getValue());
34
        $this->columnPath->setValue('test');
35
        $this->assertEquals('test', $this->columnPath->getValue());
36
    }
37
38
    public function testToArray()
39
    {
40
        $this->assertEquals([
41
            'value' => '[Name].id',
42
        ], $this->columnPath->toArray());
43
    }
44
}
45