BaseTestUtilities   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A getMock() 0 10 1
1
<?php
2
namespace Mezon\CustomClient\Tests;
3
4
use PHPUnit\Framework\TestCase;
5
use Mezon\CustomClient\CustomClient;
6
7
/**
8
 *
9
 * @psalm-suppress PropertyNotSetInConstructor
10
 */
11
class BaseTestUtilities extends TestCase
12
{
13
14
    /**
15
     * Creating mock
16
     *
17
     * @return object mock object
18
     */
19
    protected function getMock(array $methods = [
20
        'sendRequest'
21
    ]): object
22
    {
23
        return $this->getMockBuilder(CustomClient::class)
24
            ->onlyMethods($methods)
25
            ->setConstructorArgs([
26
            'http://ya.ru'
27
        ])
28
            ->getMock();
29
    }
30
}
31