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

UnitTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 32
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 11 1
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
}