Completed
Push — master ( 06b292...adafac )
by Nicolai
02:22
created

UnitTest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 11
Code Lines 7

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 7
nc 1
nop 2
dl 0
loc 11
rs 9.4285
c 0
b 0
f 0
1
<?php
2
3
4
namespace SmartWeb\ModuleTesting\Codeception\Generator;
5
6
class UnitTest extends BaseGenerator
7
{
8
    
9
    /**
10
     * @var string
11
     */
12
    protected $name;
13
    
14
    /**
15
     * @var string
16
     */
17
    protected $testsDir;
18
    
19
    /**
20
     * UnitTest constructor.
21
     *
22
     * @param array  $settings
23
     * @param string $name
24
     */
25
    public function __construct(array $settings, string $name)
26
    {
27
        parent::__construct('Unit', 'test.unit');
28
        
29
        $this->settings = $settings;
30
        $this->name = $name;
31
        
32
        $this->settings['namespace'] = $this->getNamespaceForTest();
33
        $this->settings['name'] = $this->getShortClassName($this->name);
34
        $this->settings['baseClassShort'] = $this->getShortClassName($this->settings['baseClass']);
35
    }
36
    
37
}