Failed Conditions
Push — master ( 2fcedf...efe7fa )
by Guillermo A.
01:42
created

CredentialsAwareTraitTest::testSetGetToken()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 5
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace GuillermoandraeTest\Highrise\Http;
4
5
use Guillermoandrae\Highrise\Http\CredentialsAwareTrait;
6
use PHPUnit\Framework\TestCase;
7
8
class CredentialsAwareTraitTest extends TestCase
9
{
10
    /**
11
     * @var CredentialsAwareTrait
12
     */
13
    private $trait;
14
15
    public function testSetGetSubdomain()
16
    {
17
        $subdomain = 'test';
18
        $this->trait->setSubdomain($subdomain);
19
        $this->assertSame($subdomain, $this->trait->getSubdomain());
20
    }
21
22
    public function testSetGetToken()
23
    {
24
        $token = 'test';
25
        $this->trait->setToken($token);
26
        $this->assertSame($token, $this->trait->getToken());
27
    }
28
29
    public function testSetGetPassword()
30
    {
31
        $password = 'test';
32
        $this->trait->setPassword($password);
33
        $this->assertSame($password, $this->trait->getPassword());
34
    }
35
36
    protected function setUp()
37
    {
38
        $this->trait = $this->getMockForTrait(CredentialsAwareTrait::class);
0 ignored issues
show
Documentation Bug introduced by
It seems like $this->getMockForTrait(G...tialsAwareTrait::class) of type PHPUnit\Framework\MockObject\MockObject is incompatible with the declared type Guillermoandrae\Highrise...p\CredentialsAwareTrait of property $trait.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
39
    }
40
}
41