Code Duplication    Length = 22-22 lines in 2 locations

spec/Akeneo/Crowdin/Api/InfoSpec.php 1 location

@@ 12-33 (lines=22) @@
9
use PhpSpec\ObjectBehavior;
10
use Prophecy\Argument;
11
12
class InfoSpec extends ObjectBehavior
13
{
14
    public function let(Client $client, HttpClient $http, Request $request, Response $response)
15
    {
16
        $client->getHttpClient()->willReturn($http);
17
        $client->getProjectIdentifier()->willReturn('akeneo');
18
        $client->getProjectApiKey()->willReturn('1234');
19
        $http->get('project/akeneo/info?key=1234')->willReturn($response);
20
        $response->getBody()->willReturn('<xml></xml>');
21
        $this->beConstructedWith($client);
22
    }
23
24
    public function it_should_be_an_api()
25
    {
26
        $this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
27
    }
28
29
    public function it_gets_project_info()
30
    {
31
        $this->execute()->shouldBe('<xml></xml>');
32
    }
33
}
34

spec/Akeneo/Crowdin/Api/StatusSpec.php 1 location

@@ 12-33 (lines=22) @@
9
use PhpSpec\ObjectBehavior;
10
use Prophecy\Argument;
11
12
class StatusSpec extends ObjectBehavior
13
{
14
    public function let(Client $client, HttpClient $http, Request $request, Response $response)
15
    {
16
        $client->getHttpClient()->willReturn($http);
17
        $client->getProjectIdentifier()->willReturn('akeneo');
18
        $client->getProjectApiKey()->willReturn('1234');
19
        $http->get('project/akeneo/status?key=1234')->willReturn($response);
20
        $response->getBody()->willReturn('<xml></xml>');
21
        $this->beConstructedWith($client);
22
    }
23
24
    public function it_should_be_an_api()
25
    {
26
        $this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi');
27
    }
28
29
    public function it_gets_project_translations_status()
30
    {
31
        $this->execute()->shouldBe('<xml></xml>');
32
    }
33
}
34