Completed
Push — master ( 3198df...d94c43 )
by
unknown
9s
created

StorefrontTest::testGetStorefrontSubscriptions()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 12
Ratio 100 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 12
loc 12
rs 9.4285
cc 1
eloc 8
nc 1
nop 0
1
<?php
2
3
namespace Xsolla\SDK\Tests\Integration\API;
4
5
/**
6
 * @group api
7
 */
8
class StorefrontTest extends AbstractAPITest
9
{
10
    protected $currency;
11
    protected $language;
12
    protected $userId;
13
14
    public function setUp()
15
    {
16
        parent::setUp();
17
        $this->currency = 'USD';
18
        $this->language = 'en';
19
        $this->userId = 'test';
20
    }
21
22 View Code Duplication
    public function testGetStorefrontVirtualCurrency()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
23
    {
24
        $response = $this->xsollaClient->GetStorefrontVirtualCurrency(
25
            array(
26
                'project_id' => $this->projectId,
27
                'user_id' => $this->userId,
28
                'language' => $this->language,
29
                'currency' => $this->currency,
30
            )
31
        );
32
        static::assertInternalType('array', $response);
33
    }
34
35 View Code Duplication
    public function testGetStorefrontVirtualGroups()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
36
    {
37
        $response = $this->xsollaClient->GetStorefrontVirtualGroups(
38
            array(
39
                'project_id' => $this->projectId,
40
                'user_id' => $this->userId,
41
                'language' => $this->language,
42
                'currency' => $this->currency,
43
            )
44
        );
45
        static::assertInternalType('array', $response);
46
    }
47
48 View Code Duplication
    public function testGetStorefrontVirtualItems()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
49
    {
50
        $response = $this->xsollaClient->GetStorefrontVirtualItems(
51
            array(
52
                'project_id' => $this->projectId,
53
                'user_id' => $this->userId,
54
                'language' => $this->language,
55
                'currency' => $this->currency,
56
                'group_id' => 7,
57
            )
58
        );
59
        static::assertInternalType('array', $response);
60
    }
61
62 View Code Duplication
    public function testGetStorefrontSubscriptions()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
63
    {
64
        $response = $this->xsollaClient->GetStorefrontSubscriptions(
65
            array(
66
                'project_id' => $this->projectId,
67
                'user_id' => $this->userId,
68
                'language' => $this->language,
69
                'currency' => $this->currency,
70
            )
71
        );
72
        static::assertInternalType('array', $response);
73
    }
74
75 View Code Duplication
    public function testGetStorefrontBonus()
0 ignored issues
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
76
    {
77
        $response = $this->xsollaClient->GetStorefrontBonus(
78
            array(
79
                'project_id' => $this->projectId,
80
                'user_id' => $this->userId,
81
                'language' => $this->language,
82
                'currency' => $this->currency,
83
            )
84
        );
85
        static::assertInternalType('array', $response);
86
    }
87
}
88