TestCaseVersion4   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Test Coverage

Coverage 75%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 2
dl 0
loc 19
ccs 6
cts 8
cp 0.75
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A createMock() 0 8 1
1
<?php
2
/**
3
 * Common tests stuff
4
 *
5
 * @see       https://github.com/sergeymakinen/tests
6
 * @copyright Copyright (c) 2017 Sergey Makinen (https://makinen.ru)
7
 * @license   https://github.com/sergeymakinen/tests/blob/master/LICENSE MIT License
8
 */
9
10
namespace SergeyMakinen\Tests;
11
12
use SergeyMakinen\Tests\Util\ExpectExceptionTrait;
13
use SergeyMakinen\Tests\Util\ExtensionTrait;
14
15
abstract class TestCaseVersion4 extends \PHPUnit_Framework_TestCase
16
{
17
    use ExpectExceptionTrait;
18
    use ExtensionTrait;
19
20
    /**
21
     * @param string $originalClassName
22
     * @return \PHPUnit_Framework_MockObject_MockObject
23
     * @throws \Exception
24
     */
25 1
    protected function createMock($originalClassName)
26
    {
27 1
        return $this->getMockBuilder($originalClassName)
28 1
            ->disableOriginalConstructor()
29 1
            ->disableOriginalClone()
30 1
            ->disableArgumentCloning()
31 1
            ->getMock();
32
    }
33
}
34