NullableTitleTraitTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
c 0
b 0
f 0
lcom 1
cbo 1
dl 0
loc 16
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A testNullableTitleTrait() 0 8 1
1
<?php
2
/**
3
 * This file is part of the Axstrad library.
4
 *
5
 * (c) Dan Kempster <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 *
10
 * @author Dan Kempster <[email protected]>
11
 * @package Axstrad\Common
12
 * @subpackage Tests
13
 */
14
namespace Axstrad\Common\Tests\Traits;
15
16
use Axstrad\Component\Test\TraitTestCase;
17
18
19
/**
20
 * Axstrad\Common\Tests\Traits\NullableTitleTraitTest
21
 *
22
 * covers Axstrad\Common\Traits\NullableTitleTrait::getTitle
23
 * covers Axstrad\Common\Traits\NullableTitleTrait::setTitle
24
 * @group unittest
25
 * @uses Axstrad\Common\Traits\NullableTitleTrait
26
 */
27
class NullableTitleTraitTest extends TraitTestCase
28
{
29
    protected $trait = 'Axstrad\Common\Traits\NameTrait';
30
31
    /**
32
     * @depends Axstrad\Common\Tests\Traits\TitleTraitTest::testTitleTrait
33
     */
34
    public function testNullableTitleTrait()
35
    {
36
        $this->fixture = $this->getMockForTrait('Axstrad\Common\Traits\NullableTitleTrait');
37
38
        $this->fixture->setTitle('Bar');
39
        $this->fixture->setTitle(null);
40
        $this->assertNull($this->fixture->getTitle());
41
    }
42
}
43