FormHeaderUnitTest   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 8
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A testFillAllRow() 0 9 1
A testConstructor() 0 12 1
1
<?php
2
namespace Mezon\Gui\FormBuilder\Tests;
3
4
use PHPUnit\Framework\TestCase;
5
use Mezon\Gui\FormBuilder\FormHeader;
6
7
/**
8
 *
9
 * @psalm-suppress PropertyNotSetInConstructor
10
 */
11
class FormHeaderUnitTest extends TestCase
12
{
13
14
    /**
15
     * Testing constructor
16
     */
17
    public function testConstructor(): void
18
    {
19
        // setup
20
        $field = new FormHeader([
21
            'text' => 'name'
22
        ]);
23
24
        // test body
25
        $content = $field->html();
26
27
        // assertions
28
        $this->assertStringContainsString('<h3>name</h3>', $content, 'Header was not built');
29
    }
30
31
    /**
32
     * Testing fillAllRow method
33
     */
34
    public function testFillAllRow(): void
35
    {
36
        // setup
37
        $field = new FormHeader([
38
            'text' => 'name'
39
        ]);
40
41
        // test body and assertions
42
        $this->assertFalse($field->fillAllRow());
43
    }
44
}
45