Passed
Pull Request — master (#365)
by Dmitry
21:01
created

CustomerAccessRestApiCest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A requestCustomerAccess() 0 13 1
1
<?php
2
3
/**
4
 * This file is part of the Spryker Commerce OS.
5
 * For full license information, please view the LICENSE file that was distributed with this source code.
6
 */
7
8
namespace PyzTest\Glue\CustomerAccess\RestApi;
9
10
use Codeception\Util\HttpCode;
11
use PyzTest\Glue\CustomerAccess\CustomerAccessApiTester;
12
13
/**
14
 * Auto-generated group annotations
15
 *
16
 * @group PyzTest
17
 * @group Glue
18
 * @group CustomerAccess
19
 * @group RestApi
20
 * @group CustomerAccessRestApiCest
21
 * Add your own group annotations below this line
22
 * @group EndToEnd
23
 */
24
class CustomerAccessRestApiCest
25
{
26
    /**
27
     * @param \PyzTest\Glue\CustomerAccess\CustomerAccessApiTester $I
28
     *
29
     * @return void
30
     */
31
    public function requestCustomerAccess(CustomerAccessApiTester $I): void
32
    {
33
        // Act
34
        $I->sendGET('customer-access');
35
36
        // Assert
37
        $I->seeResponseCodeIs(HttpCode::OK);
38
        $I->seeResponseIsJson();
39
        $I->seeResponseMatchesOpenApiSchema();
40
41
        $I->amSure('Returned collection of resources with type of type customer-access and size 1')
42
            ->whenI()
43
            ->seeResponseDataContainsResourceCollectionOfTypeWithSizeOf('customer-access', 1);
0 ignored issues
show
Bug introduced by
It seems like seeResponseDataContainsR...ctionOfTypeWithSizeOf() must be provided by classes using this trait. How about adding it as abstract method to this trait? ( Ignorable by Annotation )

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

43
            ->/** @scrutinizer ignore-call */ seeResponseDataContainsResourceCollectionOfTypeWithSizeOf('customer-access', 1);
Loading history...
44
    }
45
}
46