SettingTest::setUp()   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
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace SumoCoders\FrameworkSettingsBundle\Tests\Entity;
4
5
use SumoCoders\FrameworkSettingsBundle\Entity\Setting;
6
7
class SettingTest extends \PHPUnit_Framework_TestCase
8
{
9
    /**
10
     * @var Setting
11
     */
12
    protected $setting;
13
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function setUp()
18
    {
19
        $this->setting = new Setting();
20
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function tearDown()
26
    {
27
        $this->setting = null;
28
    }
29
30
    /**
31
     * Tests the getters and setters
32
     */
33
    public function testGettersAndSetters()
34
    {
35
        $this->setting->setEditable(true);
36
        $this->assertTrue($this->setting->isEditable());
37
38
        $this->setting->setName('name');
39
        $this->assertEquals('name', $this->setting->getName());
40
41
        $this->setting->setValue('value');
42
        $this->assertEquals('value', $this->setting->getValue());
43
    }
44
}
45