Passed
Push — master ( 7b14f6...f49505 )
by Gabriel
12:07
created

AbstractDefinitionTestCase::newDefinition()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace ByTIC\Models\SmartProperties\Tests\Definitions;
4
5
use ByTIC\Models\SmartProperties\Definitions\Definition;
6
use ByTIC\Models\SmartProperties\Tests\AbstractTest;
7
use ByTIC\Models\SmartProperties\Tests\Fixtures\RecordsTraits\HasTypes\Records;
8
9
/**
10
 * Class AbstractDefinitionTest
11
 * @package ByTIC\Models\SmartProperties\Tests\Definitions
12
 */
13
abstract class AbstractDefinitionTestCase extends AbstractTest
14
{
15
    protected function newDefinitionWithManager(): Definition
16
    {
17
        $definition = $this->newDefinition();
18
19
        $manager = \Mockery::mock(Records::class)->shouldAllowMockingProtectedMethods()->makePartial();
20
        $definition->setManager($manager);
21
22
        return $definition;
23
    }
24
25
    protected function newDefinition(): Definition
26
    {
27
        $definition = new Definition();
28
        return $definition;
29
    }
30
}
31