Completed
Push — master ( efcd9d...99efad )
by PHPLicengine
08:21 queued 02:36
created

BsdTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 9
c 1
b 0
f 0
dl 0
loc 14
rs 10
wmc 1
1
<?php
2
3
// BsdTest.php
4
#################################################
5
##
6
## PHPLicengine
7
##
8
#################################################
9
## Copyright 2009-{current_year} PHPLicengine
10
## 
11
## Licensed under the Apache License, Version 2.0 (the "License");
12
## you may not use this file except in compliance with the License.
13
## You may obtain a copy of the License at
14
##
15
##    http://www.apache.org/licenses/LICENSE-2.0
16
##
17
## Unless required by applicable law or agreed to in writing, software
18
## distributed under the License is distributed on an "AS IS" BASIS,
19
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
20
## See the License for the specific language governing permissions and
21
## limitations under the License.
22
#################################################
23
24
use PHPLicengine\Api\ApiInterface;
25
use PHPLicengine\Service\Bsd;
26
use PHPUnit\Framework\TestCase;
27
28
class BsdTest extends TestCase
29
{
30
    
31
    public function testGetBSDs()
32
    {
33
        $mock = $this->createMock(ApiInterface::class);
34
        $mock
35
            ->expects($this->once())
36
            ->method('get')
37
            ->with(
38
                    $this->equalTo('https://api-ssl.bitly.com/v4/bsds')
39
                    );
40
        $bitlink = new Bsd($mock);
41
        $bitlink->getBSDs();
42
    } 
43
44
}
45