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

ExpressionTypeTest   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\ExpressionType;
6
use PHPUnit\Framework\TestCase;
7
8
class ExpressionTypeTest extends TestCase
9
{
10
11
    /**
12
     * @var ExpressionType
13
     */
14
    private $expressionType;
15
16
    protected function setUp()
17
    {
18
        $this->expressionType = new ExpressionType(ExpressionType::ARITHMETIC_OPERATION);
19
    }
20
21
    protected function tearDown()
22
    {
23
        $this->expressionType = null;
24
    }
25
26
    public function testGetKeyName()
27
    {
28
        $this->assertEquals('ExpressionType', $this->expressionType->getKeyName());
29
    }
30
31
    public function testSetGetValue()
32
    {
33
        $this->assertEquals(ExpressionType::ARITHMETIC_OPERATION, $this->expressionType->getValue());
34
        $this->expressionType->setValue(ExpressionType::PARAMETER);
35
        $this->assertEquals(ExpressionType::PARAMETER, $this->expressionType->getValue());
36
    }
37
38
    public function testToArray()
39
    {
40
        $this->assertEquals([
41
            'value' => ExpressionType::ARITHMETIC_OPERATION,
42
        ], $this->expressionType->toArray());
43
    }
44
}
45