shouldNotHaveToPassHttpClientToConstructor()   A
last analyzed

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
/**
4
 * This file is a part of nekland youtube api package
5
 *
6
 * (c) Nekland <[email protected]>
7
 *
8
 * For the full license, take a look to the LICENSE file
9
 * on the root directory of this project
10
 */
11
12
namespace Nekland\Tests;
13
14
15
use Nekland\YoutubeApi\Youtube;
16
17
class YoutubeTest extends \PHPUnit_Framework_TestCase
18
{
19
    /**
20
     * @test
21
     */
22
    public function shouldNotHaveToPassHttpClientToConstructor()
23
    {
24
        $api = new Youtube();
25
        $this->assertInstanceOf('Nekland\\YoutubeApi\\Http\\HttpClient', $api->getClient());
26
    }
27
28
    /**
29
     * @test
30
     */
31
    public function shouldAllowToPassHttpClientToConstructor()
32
    {
33
        $api = new Youtube($this->prophesize('Nekland\\BaseApi\\Http\\ClientInterface')->reveal());
34
        $this->assertInstanceOf('Nekland\\BaseApi\\Http\\ClientInterface', $api->getClient());
35
    }
36
}
37