Test Failed
Push — master ( 475bfc...ca0e1d )
by Oss
05:46
created

ContractTest   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 44
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 2
dl 0
loc 44
rs 10
c 0
b 0
f 0

6 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A tearDown() 0 4 1
A testValidateException() 0 4 1
A testSetGetRootSchemaName() 0 5 1
A testSetGetOperationType() 0 5 1
A testSetGetContractType() 0 5 1
1
<?php
2
3
namespace Test\Brownie\BpmOnline\DataService;
4
5
use PHPUnit\Framework\TestCase;
6
use Brownie\BpmOnline\DataService\Contract;
7
8
class ContractTest extends TestCase
9
{
10
11
    /**
12
     * @var Contract
13
     */
14
    private $contract;
15
16
    protected function setUp()
17
    {
18
        $this->contract = new Contract();
19
    }
20
21
    protected function tearDown()
22
    {
23
        $this->contract = null;
24
    }
25
26
    /**
27
     * @expectedException \Brownie\BpmOnline\Exception\ValidateException
28
     */
29
    public function testValidateException()
30
    {
31
        $this->contract->validate();
32
    }
33
34
    public function testSetGetRootSchemaName()
35
    {
36
        $this->contract->setRootSchemaName('TestRootSchemaName');
37
        $this->assertEquals('TestRootSchemaName', $this->contract->getRootSchemaName());
38
    }
39
40
    public function testSetGetOperationType()
41
    {
42
        $this->contract->setOperationType('TestOperationType');
43
        $this->assertEquals('TestOperationType', $this->contract->getOperationType());
44
    }
45
46
    public function testSetGetContractType()
47
    {
48
        $this->contract->setContractType('TestContractType');
49
        $this->assertEquals('TestContractType', $this->contract->getContractType());
50
    }
51
}
52