Completed
Pull Request — master (#18)
by
unknown
04:18
created

EdgeDatabaseTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A testConstruct() 0 5 1
1
<?php
2
3
namespace TraderInteractive\NetAcuity\Databases\Tests;
4
5
use TraderInteractive\NetAcuity\Databases\EdgeDatabase;
6
use TraderInteractive\NetAcuity\Tests\NetAcuityTestSuite;
7
8
/**
9
 * @coversDefaultClass \TraderInteractive\NetAcuity\Databases\EdgeDatabase
10
 * @covers ::<private>
11
 */
12
class EdgeDatabaseTest extends NetAcuityTestSuite
13
{
14
    /**
15
     * @test
16
     * @covers ::__construct
17
     *
18
     * @return void
19
     */
20
    public function testConstruct()
21
    {
22
        $actual = new EdgeDatabase($this->getMockGuzzleClient(), 'a token');
0 ignored issues
show
Bug introduced by
It seems like $this->getMockGuzzleClient() targeting TraderInteractive\NetAcu...::getMockGuzzleClient() can also be of type object<PHPUnit_Framework_MockObject_MockObject>; however, TraderInteractive\NetAcu...Database::__construct() does only seem to accept object<GuzzleHttp\ClientInterface>, maybe add an additional type check?

This check looks at variables that are passed out again to other methods.

If the outgoing method call has stricter type requirements than the method itself, an issue is raised.

An additional type check may prevent trouble.

Loading history...
23
        $this->assertInstanceOf(EdgeDatabase::class, $actual);
24
    }
25
}
26