Completed
Push — bump-versions ( 12b655 )
by Nicolas
03:02
created

SupportedLanguagesSpec::it_should_be_an_api()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace spec\Akeneo\Crowdin\Api;
4
5
use PhpSpec\ObjectBehavior;
6
use Prophecy\Argument;
7
use Akeneo\Crowdin\Client;
8
use Guzzle\Http\Client as HttpClient;
9
use Guzzle\Http\Message\Response;
10
use Guzzle\Http\Message\Request;
11
12
class SupportedLanguagesSpec extends ObjectBehavior
13
{
14
    function let(Client $client, HttpClient $http, Request $request, Response $response)
15
    {
16
        $client->getHttpClient()->willReturn($http);
17
        $http->get('supported-languages')->willReturn($request);
18
        $request->send()->willReturn($response);
19
        $response->getBody(true)->willReturn('<xml></xml>');
20
        $this->beConstructedWith($client);
21
    }
22
23
    function it_should_be_an_api()
24
    {
25
        $this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
26
    }
27
28
    function it_gets_supported_languages()
29
    {
30
        $this->execute()->shouldBe('<xml></xml>');
31
    }
32
}
33