PageTest::testGetContent()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace Beelab\SimplePageBundle\Tests\Entity;
4
5
use Beelab\SimplePageBundle\Entity\Page;
6
use PHPUnit\Framework\TestCase;
7
8
/**
9
 * @group unit
10
 */
11
final class PageTest extends TestCase
12
{
13
    protected $page;
14
15
    protected function setUp(): void
16
    {
17
        $this->page = new Page();
18
    }
19
20
    public function testToString(): void
21
    {
22
        $this->page->setTitle('foo');
23
        $this->assertEquals('foo', $this->page->__toString());
24
    }
25
26
    public function testGetId(): void
27
    {
28
        $this->assertNull($this->page->getId());
29
    }
30
31
    public function testGetTemplate(): void
32
    {
33
        $this->page->setTemplate('foo');
34
        $this->assertEquals('foo', $this->page->getTemplate());
35
    }
36
37
    public function testGetPath(): void
38
    {
39
        $this->page->setPath('foo');
40
        $this->assertEquals('foo', $this->page->getPath());
41
    }
42
43
    public function testGetTitle(): void
44
    {
45
        $this->page->setTitle('foo');
46
        $this->assertEquals('foo', $this->page->getTitle());
47
    }
48
49
    public function testGetContent(): void
50
    {
51
        $this->page->setContent('foo');
52
        $this->assertEquals('foo', $this->page->getContent());
53
    }
54
}
55