Completed
Push — develop ( 2c75a2...3f95e8 )
by Adam
08:12
created

BasicAuthClientSpec::it_is_initializable()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
namespace spec\IBM\Watson\Common;
4
5
use Http\Client\HttpClient;
6
use IBM\Watson\Common\AbstractClient;
7
use IBM\Watson\Common\BasicAuthClient;
8
use PhpSpec\ObjectBehavior;
9
10
class BasicAuthClientSpec extends ObjectBehavior
11
{
12
    public function setUp(HttpClient $httpClient)
13
    {
14
        $this->beConstructedWith($httpClient);
15
    }
16
17
    public function it_is_initializable()
18
    {
19
        $this->shouldHaveType(BasicAuthClient::class);
20
        $this->shouldHaveType(AbstractClient::class);
21
    }
22
23
    public function it_should_create_client()
24
    {
25
        $this::create('username', 'password')->shouldReturnAnInstanceOf(BasicAuthClient::class);
26
    }
27
28
    public function it_should_discover_http_client()
29
    {
30
        $this::create('username', 'password')
31
            ->discoverHttpClient()
32
            ->shouldReturnAnInstanceOf(HttpClient::class);
33
    }
34
}
35