TestCaseVersion4::createMock()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 6
CRAP Score 1.0156

Importance

Changes 0
Metric Value
dl 0
loc 8
ccs 6
cts 8
cp 0.75
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 1
crap 1.0156
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