TopicTest::testGetNameShouldBeEqualSetName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/* Copyright (C) 2015 Michael Giesler
4
 *
5
 * This file is part of Dembelo.
6
 *
7
 * Dembelo is free software: you can redistribute it and/or modify
8
 * it under the terms of the GNU Affero General Public License as published by
9
 * the Free Software Foundation, either version 3 of the License, or
10
 * (at your option) any later version.
11
 *
12
 * Dembelo is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
 * GNU Affero General Public License 3 for more details.
16
 *
17
 * You should have received a copy of the GNU Affero General Public License 3
18
 * along with Dembelo. If not, see <http://www.gnu.org/licenses/>.
19
 */
20
21
22
/**
23
 * @package DembeloMain
24
 */
25
26
namespace DembeloMain\Tests\Controller;
27
28
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
29
use DembeloMain\Document\Topic;
30
31
/**
32
 * Class DefaultControllerTest
33
 */
34
class TopicTest extends WebTestCase
35
{
36
    /**
37
     * @var Topic
38
     */
39
    private $topic;
40
41
    /**
42
     * setUp method
43
     */
44
    public function setUp()
45
    {
46
        $this->topic = new Topic();
47
    }
48
49
    /**
50
     * tests getId()
51
     */
52
    public function testGetIdShouldBeEqualSetId()
53
    {
54
        $this->topic->setId('testid');
55
        $this->assertEquals('testid', $this->topic->getId());
56
    }
57
58
    /**
59
     * tests getName()
60
     */
61
    public function testGetNameShouldBeEqualSetName()
62
    {
63
        $this->topic->setName('testname');
64
        $this->assertEquals('testname', $this->topic->getName());
65
    }
66
67
    /**
68
     * tests getStatus()
69
     */
70
    public function testGetStatusShouldBeEqualSetStatus()
71
    {
72
        $this->topic->setStatus('teststatus');
73
        $this->assertEquals('teststatus', $this->topic->getStatus());
74
    }
75
76
    /**
77
     * tests getSortKey()
78
     */
79
    public function testGetSortKey()
80
    {
81
        $this->topic->setSortKey(123);
82
        $this->assertEquals(123, $this->topic->getSortKey());
83
    }
84
}
85