Test Failed
Push — master ( 257d98...3364ef )
by Yunus Emre
06:12
created

AuthenticationTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
eloc 6
c 2
b 0
f 0
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A user_can_authenticate() 0 9 1
1
<?php
2
3
namespace TarfinLabs\Parasut\Tests;
4
5
use Illuminate\Support\Carbon;
6
use TarfinLabs\Parasut\API\ClientGateway;
7
use TarfinLabs\Parasut\Tests\Mocks\ParasutMock;
8
9
class AuthenticationTest extends TestCase
10
{
11
    /** @test */
12
    public function user_can_authenticate(): void
13
    {
14
        ParasutMock::fakeAuthentication();
15
16
        $parasutClient = app(ClientGateway::class);
17
18
        $this->assertNotNull($parasutClient->getAccessToken());
19
        $this->assertNotNull($parasutClient->getRefreshToken());
20
        $this->assertInstanceOf(Carbon::class, $parasutClient->getExpiresAt());
0 ignored issues
show
Bug introduced by
The method getExpiresAt() does not exist on TarfinLabs\Parasut\API\ClientGateway. Since it exists in all sub-types, consider adding an abstract or default implementation to TarfinLabs\Parasut\API\ClientGateway. ( Ignorable by Annotation )

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

20
        $this->assertInstanceOf(Carbon::class, $parasutClient->/** @scrutinizer ignore-call */ getExpiresAt());
Loading history...
21
    }
22
}
23