Passed
Push — master ( d657dc...438755 )
by Alex
07:49
created

BaseTestUtilities::getMock()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 4
c 1
b 0
f 1
dl 0
loc 8
rs 10
cc 1
nc 1
nop 1
1
<?php
2
namespace Mezon\CustomClient\Tests;
3
4
use PHPUnit\Framework\TestCase;
5
use Mezon\CustomClient\CustomClient;
6
7
class BaseTestUtilities extends TestCase
8
{
9
10
    /**
11
     * Creating mock
12
     */
13
    protected function getMock(array $methods = [
14
        'sendRequest'
15
    ]): object
16
    {
17
        return $this->getMockBuilder(CustomClient::class)
0 ignored issues
show
Deprecated Code introduced by
The function PHPUnit\Framework\MockOb...ckBuilder::setMethods() has been deprecated: https://github.com/sebastianbergmann/phpunit/pull/3687 ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-deprecated  annotation

17
        return /** @scrutinizer ignore-deprecated */ $this->getMockBuilder(CustomClient::class)

This function has been deprecated. The supplier of the function has supplied an explanatory message.

The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.

Loading history...
18
            ->setMethods($methods)
19
            ->disableOriginalConstructor()
20
            ->getMock();
21
    }
22
}
23