Passed
Push — master ( 813fe9...62056b )
by Sebastian
06:01
created

BaseTestRunner   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 52
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 5
c 1
b 0
f 0
lcom 0
cbo 0
dl 0
loc 52
rs 10

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getIOMock() 0 6 1
A getConfigMock() 0 6 1
A getHookConfigMock() 0 6 1
A getActionConfigMock() 0 6 1
A getRepositoryMock() 0 6 1
1
<?php
2
/**
3
 * This file is part of CaptainHook.
4
 *
5
 * (c) Sebastian Feldmann <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
namespace CaptainHook\App\Runner;
11
12
class BaseTestRunner extends \PHPUnit_Framework_TestCase
13
{
14
    /**
15
     * @return \CaptainHook\App\Console\IO\DefaultIO
16
     */
17
    public function getIOMock()
18
    {
19
        return $this->getMockBuilder('\\CaptainHook\\App\\Console\\IO\DefaultIO')
20
                    ->disableOriginalConstructor()
21
                    ->getMock();
22
    }
23
24
    /**
25
     * @return \CaptainHook\App\Config
26
     */
27
    public function getConfigMock()
28
    {
29
        return $this->getMockBuilder('\\CaptainHook\\App\\Config')
30
                    ->disableOriginalConstructor()
31
                    ->getMock();
32
    }
33
34
    /**
35
     * @return \CaptainHook\App\Config\Hook
36
     */
37
    public function getHookConfigMock()
38
    {
39
        return $this->getMockBuilder('\\CaptainHook\\App\\Config\\Hook')
40
                    ->disableOriginalConstructor()
41
                    ->getMock();
42
    }
43
44
    /**
45
     * @return \CaptainHook\App\Config\Action
46
     */
47
    public function getActionConfigMock()
48
    {
49
        return $this->getMockBuilder('\\CaptainHook\\App\\Config\\Action')
50
                    ->disableOriginalConstructor()
51
                    ->getMock();
52
    }
53
54
    /**
55
     * @return \CaptainHook\App\Git\Repository
56
     */
57
    public function getRepositoryMock()
58
    {
59
        return $this->getMockBuilder('\\CaptainHook\\App\\Git\\Repository')
60
                    ->disableOriginalConstructor()
61
                    ->getMock();
62
    }
63
}
64