ListAllCountriesTest   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 1
dl 0
loc 25
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A testListAllCountries_() 0 14 1
1
<?php
2
3
namespace App\Containers\Country\UI\API\Tests\Functional;
4
5
use App\Containers\Country\Tests\TestCase;
6
7
/**
8
 * Class ListAllCountriesTest.
9
 *
10
 * @author  Mahmoud Zalt <[email protected]>
11
 */
12
class ListAllCountriesTest extends TestCase
13
{
14
15
    protected $endpoint = 'get@countries';
16
17
    protected $access = [
18
        'roles'       => '',
19
        'permissions' => '',
20
    ];
21
22
    public function testListAllCountries_()
23
    {
24
        // send the HTTP request
25
        $response = $this->makeCall();
26
27
        // assert response status is correct
28
        $this->assertEquals('200', $response->getStatusCode());
29
30
        // convert JSON response string to object
31
        $responseContent = $this->getResponseContent($response);
32
33
        // assert the returned data size is correct
34
        $this->assertCount(249, $responseContent->data);
35
    }
36
}
37