TextFieldUnitTest::testConstructor()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 4
nc 1
nop 0
dl 0
loc 12
rs 10
c 0
b 0
f 0
1
<?php
2
namespace Mezon\Gui\Field\Tests;
3
4
use PHPUnit\Framework\TestCase;
5
use Mezon\Gui\Field\TextField;
6
7
/**
8
 *
9
 * @psalm-suppress PropertyNotSetInConstructor
10
 */
11
class TextFieldUnitTest extends TestCase
12
{
13
14
    /**
15
     * Testing constructor
16
     */
17
    public function testConstructor():void
18
    {
19
        // setup
20
        $field = new TextField([
21
            'text' => 'name'
22
        ]);
23
24
        // test body
25
        $content = $field->html();
26
27
        // assertions
28
        $this->assertEquals('name', $content, 'Text was not fetched');
29
    }
30
31
    /**
32
     * Testing fillAllRow method
33
     */
34
    public function testFillAllRow(): void
35
    {
36
        // setupp
37
        $field = new TextField([
38
            'text' => 'name'
39
        ]);
40
41
        // test body and assertionss
42
        $this->assertTrue($field->fillAllRow());
43
    }
44
}
45