Completed
Push — master ( cec1cf...f9a404 )
by Javi
03:27
created

HeaderUnitTest::testConstructorAllAssignments()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 11
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
namespace erasys\OpenApi\Tests\Spec;
4
5
use erasys\OpenApi\Spec\v3\ExtensibleInterface;
6
use erasys\OpenApi\Spec\v3\Header;
7
use PHPUnit\Framework\TestCase;
8
9
class HeaderUnitTest extends TestCase
10
{
11
    public function testConstructorRequiredAssignments()
12
    {
13
        $obj = new Header();
14
15
        $this->assertInstanceOf(ExtensibleInterface::class, $obj);
16
        $this->assertNull($obj->description);
17
    }
18
19
    public function testConstructorAllAssignments()
20
    {
21
        $description = 'Lorem ipsum dolor sit amet';
22
        $additional  = [
23
            'description' => null,
24
        ];
25
26
        $obj = new Header($description, $additional);
27
28
        $this->assertInstanceOf(ExtensibleInterface::class, $obj);
29
        $this->assertEquals($description, $obj->description);
30
    }
31
}
32