SupportedLanguagesSpec   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 4
dl 0
loc 20
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A let() 0 7 1
A it_should_be_an_api() 0 4 1
A it_gets_supported_languages() 0 4 1
1
<?php
2
3
namespace spec\Akeneo\Crowdin\Api;
4
5
use Akeneo\Crowdin\Client;
6
use GuzzleHttp\Client as HttpClient;
7
use GuzzleHttp\Psr7\Request;
8
use GuzzleHttp\Psr7\Response;
9
use PhpSpec\ObjectBehavior;
10
use Prophecy\Argument;
11
12
class SupportedLanguagesSpec extends ObjectBehavior
13
{
14
    public function let(Client $client, HttpClient $http, Request $request, Response $response)
0 ignored issues
show
Unused Code introduced by
The parameter $request is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
15
    {
16
        $client->getHttpClient()->willReturn($http);
17
        $http->get('supported-languages')->willReturn($response);
18
        $response->getBody()->willReturn('<xml></xml>');
19
        $this->beConstructedWith($client);
20
    }
21
22
    public function it_should_be_an_api()
23
    {
24
        $this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
25
    }
26
27
    public function it_gets_supported_languages()
28
    {
29
        $this->execute()->shouldBe('<xml></xml>');
30
    }
31
}
32