GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ClientTest::setUp()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 */
4
5
namespace CommerceLeague\ActiveCampaign\Test\Unit\Gateway;
6
7
use CommerceLeague\ActiveCampaign\Gateway\Client;
8
use CommerceLeague\ActiveCampaign\Helper\Config as ConfigHelper;
9
use PHPUnit\Framework\MockObject\MockObject;
10
use PHPUnit\Framework\TestCase;
11
12
class ClientTest extends TestCase
13
{
14
    /**
15
     * @var MockObject|ConfigHelper
16
     */
17
    protected $configHelper;
18
19
    /**
20
     * @var Client
21
     */
22
    protected $client;
23
24
    protected function setUp()
25
    {
26
        $this->configHelper = $this->createMock(ConfigHelper::class);
27
        $this->client = new Client($this->configHelper);
28
    }
29
30
    public function testGetCommonClient()
31
    {
32
        $this->configHelper->expects($this->once())
0 ignored issues
show
Bug introduced by
The method expects() does not exist on CommerceLeague\ActiveCampaign\Helper\Config. ( Ignorable by Annotation )

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

32
        $this->configHelper->/** @scrutinizer ignore-call */ 
33
                             expects($this->once())

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
33
            ->method('getApiUrl')
34
            ->willReturn('http://example.com');
35
36
        $this->configHelper->expects($this->once())
37
            ->method('getApiToken')
38
            ->willReturn('API_TOKEN');
39
40
        $this->client->getAbandonedCartApi();
41
    }
42
}
43