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

test_getItemsDirectory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 12
rs 10
cc 1
nc 1
nop 0
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