Completed
Pull Request — master (#339)
by Alejandro
07:42
created

AuthenticationTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 11
c 0
b 0
f 0
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A unauthorizedIsReturnedIfNoAuthenticationIsSent() 0 6 1
1
<?php
2
declare(strict_types=1);
3
4
namespace ShlinkioApiTest\Shlink\Rest\Middleware;
5
6
use GuzzleHttp\Exception\ClientException;
7
use ShlinkioTest\Shlink\Common\ApiTest\ApiTestCase;
8
9
class AuthenticationTest extends ApiTestCase
10
{
11
    /**
12
     * @test
13
     */
14
    public function unauthorizedIsReturnedIfNoAuthenticationIsSent()
15
    {
16
        $this->expectException(ClientException::class);
17
        $this->expectExceptionCode(self::STATUS_UNAUTHORIZED);
18
19
        $this->callApi(self::METHOD_GET, '/rest/v1/short-codes');
20
    }
21
}
22