NullableNameTraitTest::testNullableNameTrait()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 8
rs 9.4285
cc 1
eloc 5
nc 1
nop 0
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\NullableNameTraitTest
21
 *
22
 * covers Axstrad\Common\Traits\NullableNameTrait::getName
23
 * covers Axstrad\Common\Traits\NullableNameTrait::setName
24
 * @group unittest
25
 * @uses Axstrad\Common\Traits\NullableNameTrait
26
 */
27
class NullableNameTraitTest extends TraitTestCase
28
{
29
    protected $trait = 'Axstrad\Common\Traits\NameTrait';
30
31
    /**
32
     * @depends Axstrad\Common\Tests\Traits\NameTraitTest::testNameTrait
33
     */
34
    public function testNullableNameTrait()
35
    {
36
        $this->fixture = $this->getMockForTrait('Axstrad\Common\Traits\NullableNameTrait');
37
38
        $this->fixture->setName('Bar');
39
        $this->fixture->setName(null);
40
        $this->assertNull($this->fixture->getName());
41
    }
42
}
43