SettingTest   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 38
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 3
lcom 1
cbo 2
dl 0
loc 38
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setUp() 0 4 1
A tearDown() 0 4 1
A testGettersAndSetters() 0 11 1
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