|
@@ 27-33 (lines=7) @@
|
| 24 |
|
$this->shouldBeAnInstanceOf('Akeneo\Crowdin\Api\AbstractApi'); |
| 25 |
|
} |
| 26 |
|
|
| 27 |
|
public function it_builds_last_translations(HttpClient $http, Request $request, Response $response) |
| 28 |
|
{ |
| 29 |
|
$content = '<?xml version="1.0" encoding="ISO-8859-1"?><success status="built"></success>'; |
| 30 |
|
$response->getBody()->willReturn($content); |
| 31 |
|
$http->get('project/akeneo/export?key=1234')->willReturn($response); |
| 32 |
|
$this->execute()->shouldBe($content); |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
public function it_skips_build_if_less_than_half_an_hour(HttpClient $http, Request $request, Response $response) |
| 36 |
|
{ |
|
@@ 35-41 (lines=7) @@
|
| 32 |
|
$this->execute()->shouldBe($content); |
| 33 |
|
} |
| 34 |
|
|
| 35 |
|
public function it_skips_build_if_less_than_half_an_hour(HttpClient $http, Request $request, Response $response) |
| 36 |
|
{ |
| 37 |
|
$content = '<?xml version="1.0" encoding="ISO-8859-1"?><success status="skipped"></success>'; |
| 38 |
|
$response->getBody()->willReturn($content); |
| 39 |
|
$http->get('project/akeneo/export?key=1234')->willReturn($response); |
| 40 |
|
$this->execute()->shouldBe($content); |
| 41 |
|
} |
| 42 |
|
} |
| 43 |
|
|