StorefrontTest   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 71
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 0
Metric Value
wmc 5
lcom 1
cbo 2
dl 0
loc 71
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A testGetStorefrontVirtualCurrency() 0 12 1
A testGetStorefrontVirtualGroups() 0 12 1
A testGetStorefrontVirtualItems() 0 13 1
A testGetStorefrontSubscriptions() 0 12 1
A testGetStorefrontBonus() 0 12 1
1
<?php
2
3
namespace Xsolla\SDK\Tests\Integration\API;
4
5
/**
6
 * @group api
7
 */
8
class StorefrontTest extends AbstractAPITest
9
{
10
    const LANGUAGE = 'en';
11
    const CURRENCY = 'USD';
12
13
    public function testGetStorefrontVirtualCurrency()
14
    {
15
        $response = static::$xsollaClient->GetStorefrontVirtualCurrency(
16
            [
17
                'project_id' => static::$projectId,
18
                'user_id' => static::$userId,
19
                'language' => self::LANGUAGE,
20
                'currency' => self::CURRENCY,
21
            ]
22
        );
23
        static::assertInternalType('array', $response);
0 ignored issues
show
Deprecated Code introduced by
The method PHPUnit\Framework\Assert::assertInternalType() has been deprecated with message: https://github.com/sebastianbergmann/phpunit/issues/3369

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

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

Loading history...
24
    }
25
26
    public function testGetStorefrontVirtualGroups()
27
    {
28
        $response = static::$xsollaClient->GetStorefrontVirtualGroups(
29
            [
30
                'project_id' => static::$projectId,
31
                'user_id' => static::$userId,
32
                'language' => self::LANGUAGE,
33
                'currency' => self::CURRENCY,
34
            ]
35
        );
36
        static::assertInternalType('array', $response);
0 ignored issues
show
Deprecated Code introduced by
The method PHPUnit\Framework\Assert::assertInternalType() has been deprecated with message: https://github.com/sebastianbergmann/phpunit/issues/3369

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

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

Loading history...
37
    }
38
39
    public function testGetStorefrontVirtualItems()
40
    {
41
        $response = static::$xsollaClient->GetStorefrontVirtualItems(
42
            [
43
                'project_id' => static::$projectId,
44
                'user_id' => static::$userId,
45
                'language' => self::LANGUAGE,
46
                'currency' => self::CURRENCY,
47
                'group_id' => 7,
48
            ]
49
        );
50
        static::assertInternalType('array', $response);
0 ignored issues
show
Deprecated Code introduced by
The method PHPUnit\Framework\Assert::assertInternalType() has been deprecated with message: https://github.com/sebastianbergmann/phpunit/issues/3369

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

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

Loading history...
51
    }
52
53
    public function testGetStorefrontSubscriptions()
54
    {
55
        $response = static::$xsollaClient->GetStorefrontSubscriptions(
56
            [
57
                'project_id' => static::$projectId,
58
                'user_id' => static::$userId,
59
                'language' => self::LANGUAGE,
60
                'currency' => self::CURRENCY,
61
            ]
62
        );
63
        static::assertInternalType('array', $response);
0 ignored issues
show
Deprecated Code introduced by
The method PHPUnit\Framework\Assert::assertInternalType() has been deprecated with message: https://github.com/sebastianbergmann/phpunit/issues/3369

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

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

Loading history...
64
    }
65
66
    public function testGetStorefrontBonus()
67
    {
68
        $response = static::$xsollaClient->GetStorefrontBonus(
69
            [
70
                'project_id' => static::$projectId,
71
                'user_id' => static::$userId,
72
                'language' => self::LANGUAGE,
73
                'currency' => self::CURRENCY,
74
            ]
75
        );
76
        static::assertInternalType('array', $response);
0 ignored issues
show
Deprecated Code introduced by
The method PHPUnit\Framework\Assert::assertInternalType() has been deprecated with message: https://github.com/sebastianbergmann/phpunit/issues/3369

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

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

Loading history...
77
    }
78
}
79