@@ 45-52 (lines=8) @@ | ||
42 | $this->getCopyDestination()->shouldReturn('/tmp/'); |
|
43 | } |
|
44 | ||
45 | public function it_downloads_all_translations(HttpClient $http, Request $request, Response $response) |
|
46 | { |
|
47 | $this->setCopyDestination('/tmp'); |
|
48 | $this->setPackage('all.zip'); |
|
49 | $http->get('project/akeneo/download/all.zip?key=1234', ["sink" => "/tmp/all.zip"])->willReturn($response); |
|
50 | $response->getBody()->willReturn('bin'); |
|
51 | $this->execute()->shouldBe('bin'); |
|
52 | } |
|
53 | ||
54 | public function it_downloads_french_translations(HttpClient $http, Request $request, Response $response) |
|
55 | { |
|
@@ 54-61 (lines=8) @@ | ||
51 | $this->execute()->shouldBe('bin'); |
|
52 | } |
|
53 | ||
54 | public function it_downloads_french_translations(HttpClient $http, Request $request, Response $response) |
|
55 | { |
|
56 | $this->setCopyDestination('/tmp'); |
|
57 | $this->setPackage('fr.zip'); |
|
58 | $http->get('project/akeneo/download/fr.zip?key=1234', ["sink" => "/tmp/fr.zip"])->willReturn($response); |
|
59 | $response->getBody()->willReturn('bin'); |
|
60 | $this->execute()->shouldBe('bin'); |
|
61 | } |
|
62 | } |
|
63 |
@@ 26-34 (lines=9) @@ | ||
23 | $this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi'); |
|
24 | } |
|
25 | ||
26 | public function it_gets_project_language_status( |
|
27 | HttpClient $http, |
|
28 | Response $response |
|
29 | ) { |
|
30 | $this->setLanguage('fr')->shouldBe($this); |
|
31 | $http->post('project/akeneo/language-status?key=1234', ["language" => 'fr'])->willReturn($response); |
|
32 | $response->getBody(true)->willReturn('<xml></xml>'); |
|
33 | $this->execute()->shouldBe('<xml></xml>'); |
|
34 | } |
|
35 | } |
|
36 |