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

BaseTestUtilities   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 1
eloc 5
c 1
b 0
f 1
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A getMock() 0 8 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