Completed
Push — master ( 9601f0...c6396d )
by Michiel
21:12
created

ExcludesNameEntryTest::testToString()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 4
rs 10
c 1
b 0
f 0
1
<?php
2
3
use PHPUnit\Framework\TestCase;
4
5
class ExcludesNameEntryTest extends TestCase
6
{
7
    public function setUp(): void
8
    {
9
        $this->entry = new ExcludesNameEntry();
0 ignored issues
show
Bug Best Practice introduced by
The property entry does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
10
    }
11
    public function testSetName()
12
    {
13
        $this->entry->setName("test");
14
        $this->assertEquals($this->entry->getName(), "test");
15
        $this->entry->setName("test2");
16
        $this->assertEquals($this->entry->getName(), "test2");
17
    }
18
19
    public function testAddText()
20
    {
21
        $this->entry->addText("test");
22
        $this->assertEquals($this->entry->getName(), "test");
23
        $this->entry->addText("test2");
24
        $this->assertEquals($this->entry->getName(), "test2");
25
    }
26
27
    public function testToString()
28
    {
29
        $this->entry->addText("test");
30
        $this->assertEquals("" . $this->entry, "test");
31
    }
32
}
33