Passed
Push — master ( bcadde...416dc9 )
by Gabriel
02:50 queued 12s
created

HasItemsDirectoryTraitTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 9
c 1
b 0
f 0
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A test_getItemsDirectory() 0 12 1
1
<?php
2
3
namespace ByTIC\Models\SmartProperties\Tests\Properties\Definitions\Traits;
4
5
use ByTIC\Models\SmartProperties\Properties\Definitions\Definition;
6
use ByTIC\Models\SmartProperties\Tests\AbstractTest;
7
use ByTIC\Models\SmartProperties\Tests\Fixtures\RecordsTraits\HasTypes\Records;
8
9
/**
10
 * Class HasItemsDirectoryTraitTest
11
 * @package ByTIC\Models\SmartProperties\Tests\Properties\Definitions\Traits
12
 */
13
class HasItemsDirectoryTraitTest extends AbstractTest
14
{
15
    public function test_getItemsDirectory()
16
    {
17
        $manager = \Mockery::mock(Records::class)->makePartial();
18
        $manager->shouldReceive('getTypesDirectory')->once()->andReturn('test');
19
20
        $definition = new Definition();
21
        $definition->setName('Type');
22
        $definition->setManager($manager);
23
24
        self::assertSame(
25
            'test',
26
            $definition->getItemsDirectory()
27
        );
28
    }
29
}
30