Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
  • Loading branch information
amigaire committed Mar 13, 2024
1 parent d155c29 commit 27f12e4
Show file tree
Hide file tree
Showing 26 changed files with 36 additions and 36 deletions.
2 changes: 1 addition & 1 deletion spec/Akeneo/Crowdin/Api/AddDirectorySpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function it_adds_a_directory(HttpClientInterface $http, ResponseInterface
'POST',
'project/sylius/add-directory',
[
'headers' => ['authorization' => 'Bearer 1234'],
'headers' => ['Authorization' => 'Bearer 1234'],
'body' => ['name' => 'directory-to-create']
]
)->willReturn($response);
Expand Down
4 changes: 2 additions & 2 deletions spec/Akeneo/Crowdin/Api/AddFileSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function it_should_not_add_with_no_file(HttpClientInterface $http, Respon
$http->request(
'POST',
'project/sylius/add-file',
['headers' => ['authorization' => 'Bearer 1234']]
['headers' => ['Authorization' => 'Bearer 1234']]
)->willReturn($response);
$this->shouldThrow('\InvalidArgumentException')->duringExecute();
}
Expand All @@ -69,7 +69,7 @@ public function it_adds_a_file(FileReader $fileReader, HttpClientInterface $http
[
'headers' => [
'Content-Type' => 'multipart/form-data',
'authorization' => 'Bearer 1234'
'Authorization' => 'Bearer 1234'
],
'body' => [
'files[path/to/crowdin.yml]' => $fakeResource,
Expand Down
4 changes: 2 additions & 2 deletions spec/Akeneo/Crowdin/Api/ChangeDirectorySpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function it_should_set_name(
$this->setName('myname');
$path = 'project/sylius/change-directory';
$data = [
'headers' => ['authorization' => 'Bearer 1234'],
'headers' => ['Authorization' => 'Bearer 1234'],
'body' => ['name' => 'myname']
];
$http->request('POST', $path, $data)->willReturn($response);
Expand All @@ -55,7 +55,7 @@ public function it_should_set_data(
$this->setNewName('myNewName');
$path = 'project/sylius/change-directory';
$data = [
'headers' => ['authorization' => 'Bearer 1234'],
'headers' => ['Authorization' => 'Bearer 1234'],
'body' => [
'name' => 'myName',
'branch' => 'myBranch',
Expand Down
4 changes: 2 additions & 2 deletions spec/Akeneo/Crowdin/Api/DeleteDirectorySpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function it_should_not_delete_with_no_directory(HttpClientInterface $http
$content = '<xml></xml>';
$response->getContent()->willReturn($content);

$http->request('POST', 'project/sylius/delete-directory', ['headers' => ['authorization' => 'Bearer 1234']])->willReturn($response);
$http->request('POST', 'project/sylius/delete-directory', ['headers' => ['Authorization' => 'Bearer 1234']])->willReturn($response);
$this->shouldThrow()->duringExecute();
}

Expand All @@ -40,7 +40,7 @@ public function it_deletes_a_directory(HttpClientInterface $http, ResponseInterf
'POST',
'project/sylius/delete-directory',
[
'headers' => ['authorization' => 'Bearer 1234'],
'headers' => ['Authorization' => 'Bearer 1234'],
'body' => ['name' => 'directory-to-delete']
]
)->willReturn($response);
Expand Down
4 changes: 2 additions & 2 deletions spec/Akeneo/Crowdin/Api/DeleteFileSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function it_should_not_delete_with_no_file(HttpClientInterface $http, Res
$content = '<xml></xml>';
$response->getContent()->willReturn($content);

$http->request('POST', 'project/sylius/delete-file', ['headers' => ['authorization' => 'Bearer 1234']])->willReturn($response);
$http->request('POST', 'project/sylius/delete-file', ['headers' => ['Authorization' => 'Bearer 1234']])->willReturn($response);
$this->shouldThrow()->duringExecute();
}

Expand All @@ -43,7 +43,7 @@ public function it_deletes_a_file(HttpClientInterface $http, ResponseInterface $
'POST',
'project/sylius/delete-file',
[
'headers' => ['authorization' => 'Bearer 1234'],
'headers' => ['Authorization' => 'Bearer 1234'],
'body' => ['file' => 'path/to/my/file']
]
)->willReturn($response);
Expand Down
4 changes: 2 additions & 2 deletions spec/Akeneo/Crowdin/Api/DownloadSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function it_downloads_all_translations(HttpClientInterface $http, Respons
{
$this->setCopyDestination('/tmp');
$this->setPackage('all.zip');
$http->request('GET', 'project/akeneo/download/all.zip', ['headers' => ['authorization' => 'Bearer 1234']])
$http->request('GET', 'project/akeneo/download/all.zip', ['headers' => ['Authorization' => 'Bearer 1234']])
->willReturn($response);
$response->getContent()->willReturn('translations content');
$this->execute()->shouldBe('translations content');
Expand All @@ -54,7 +54,7 @@ public function it_downloads_french_translations(HttpClientInterface $http, Resp
{
$this->setCopyDestination('/tmp');
$this->setPackage('fr.zip');
$http->request('GET', 'project/akeneo/download/fr.zip', ['headers' => ['authorization' => 'Bearer 1234']])
$http->request('GET', 'project/akeneo/download/fr.zip', ['headers' => ['Authorization' => 'Bearer 1234']])
->willReturn($response);
$response->getContent()->willReturn('translations content');
$this->execute()->shouldBe('translations content');
Expand Down
4 changes: 2 additions & 2 deletions spec/Akeneo/Crowdin/Api/ExportSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ public function it_builds_last_translations(HttpClientInterface $http, ResponseI
{
$content = '<?xml version="1.0" encoding="ISO-8859-1"?><success status="built"></success>';
$response->getContent()->willReturn($content);
$http->request('GET', 'project/akeneo/export', ['headers' => ['authorization' => 'Bearer 1234']])->willReturn($response);
$http->request('GET', 'project/akeneo/export', ['headers' => ['Authorization' => 'Bearer 1234']])->willReturn($response);
$this->execute()->shouldBe($content);
}

public function it_skips_build_if_less_than_half_an_hour(HttpClientInterface $http, ResponseInterface $response)
{
$content = '<?xml version="1.0" encoding="ISO-8859-1"?><success status="skipped"></success>';
$response->getContent()->willReturn($content);
$http->request('GET', 'project/akeneo/export', ['headers' => ['authorization' => 'Bearer 1234']])->willReturn($response);
$http->request('GET', 'project/akeneo/export', ['headers' => ['Authorization' => 'Bearer 1234']])->willReturn($response);
$this->execute()->shouldBe($content);
}
}
2 changes: 1 addition & 1 deletion spec/Akeneo/Crowdin/Api/InfoSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public function let(Client $client, HttpClientInterface $http, ResponseInterface
$client->getHttpClient()->willReturn($http);
$client->getProjectIdentifier()->willReturn('akeneo');
$client->getProjectApiKey()->willReturn('1234');
$http->request('GET', 'project/akeneo/info', ['headers' => ['authorization' => 'Bearer 1234']])->willReturn($response);
$http->request('GET', 'project/akeneo/info', ['headers' => ['Authorization' => 'Bearer 1234']])->willReturn($response);
$response->getContent()->willReturn('<xml></xml>');
$this->beConstructedWith($client);
}
Expand Down
2 changes: 1 addition & 1 deletion spec/Akeneo/Crowdin/Api/LanguageStatusSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function it_gets_project_language_status(
'POST',
'project/akeneo/language-status',
[
'headers' => ['authorization' => 'Bearer 1234'],
'headers' => ['Authorization' => 'Bearer 1234'],
'body' => ['language' => 'fr']
]
)->willReturn($response);
Expand Down
2 changes: 1 addition & 1 deletion spec/Akeneo/Crowdin/Api/StatusSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public function let(Client $client, HttpClientInterface $http, ResponseInterface
$client->getHttpClient()->willReturn($http);
$client->getProjectIdentifier()->willReturn('akeneo');
$client->getProjectApiKey()->willReturn('1234');
$http->request('GET', 'project/akeneo/status', ['headers' => ['authorization' => 'Bearer 1234']])->willReturn($response);
$http->request('GET', 'project/akeneo/status', ['headers' => ['Authorization' => 'Bearer 1234']])->willReturn($response);
$response->getContent()->willReturn('<xml></xml>');
$this->beConstructedWith($client);
}
Expand Down
2 changes: 1 addition & 1 deletion spec/Akeneo/Crowdin/Api/SupportedLanguagesSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public function let(Client $client, HttpClientInterface $http, ResponseInterface
{
$client->getHttpClient()->willReturn($http);
$client->getProjectApiKey()->willReturn('1234');
$http->request('GET', 'supported-languages', ['headers' => ['authorization' => 'Bearer 1234']])->willReturn($response);
$http->request('GET', 'supported-languages', ['headers' => ['Authorization' => 'Bearer 1234']])->willReturn($response);
$response->getContent()->willReturn('<xml></xml>');
$this->beConstructedWith($client);
}
Expand Down
6 changes: 3 additions & 3 deletions spec/Akeneo/Crowdin/Api/UpdateFileSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public function it_should_not_allow_update_with_no_file(HttpClientInterface $htt
$http->request(
'POST',
'project/akeneo/update-file',
['headers' => ['authorization' => 'Bearer 1234']]
['headers' => ['Authorization' => 'Bearer 1234']]
)->willReturn($response);
$this->shouldThrow()->duringExecute();
}
Expand All @@ -70,7 +70,7 @@ public function it_updates_some_translation_files(
'project/akeneo/update-file',
[
'headers' => [
'authorization' => 'Bearer 1234',
'Authorization' => 'Bearer 1234',
'Content-Type' => 'multipart/form-data'
],
'body' => [
Expand All @@ -94,7 +94,7 @@ public function it_sends_additionnal_parameters(
Argument::any(),
[
'headers' => [
'authorization' => 'Bearer 1234',
'Authorization' => 'Bearer 1234',
'Content-Type' => 'multipart/form-data'
],
'body' => [
Expand Down
6 changes: 3 additions & 3 deletions spec/Akeneo/Crowdin/Api/UploadTranslationSpec.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function it_should_not_allow_upload_with_no_translation(
$http->request(
'POST',
'project/sylius/upload-translation',
['headers' => ['authorization' => 'Bearer 1234']]
['headers' => ['Authorization' => 'Bearer 1234']]
)->willReturn($response);

$this->shouldThrow('\InvalidArgumentException')->duringExecute();
Expand All @@ -80,7 +80,7 @@ public function it_should_not_allow_upload_with_no_locale(HttpClientInterface $h
$http->request(
'POST',
'project/sylius/upload-translation',
['headers' => ['authorization' => 'Bearer 1234']]
['headers' => ['Authorization' => 'Bearer 1234']]
)->willReturn($response);

$this->shouldThrow()->duringExecute();
Expand All @@ -102,7 +102,7 @@ public function it_uploads_some_translations(
'project/sylius/upload-translation',
[
'headers' => [
'authorization' => 'Bearer 1234',
'Authorization' => 'Bearer 1234',
'Content-Type' => 'multipart/form-data'
],
'body' => [
Expand Down
2 changes: 1 addition & 1 deletion src/Akeneo/Crowdin/Api/AddDirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public function execute()

$data = [
'headers' => [
'authorization' => 'Bearer ' . $this->client->getProjectApiKey()
'Authorization' => 'Bearer ' . $this->client->getProjectApiKey()
],
'body' => $parameters
];
Expand Down
2 changes: 1 addition & 1 deletion src/Akeneo/Crowdin/Api/AddFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public function execute(): string
$data = [
'headers' => [
'Content-Type' => 'multipart/form-data',
'authorization' => 'Bearer 1234'
'Authorization' => 'Bearer 1234'
],
'body' => $data
];
Expand Down
2 changes: 1 addition & 1 deletion src/Akeneo/Crowdin/Api/ChangeDirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public function execute(): string
}

$data = [
'headers' => ['authorization' => 'Bearer ' . $this->client->getProjectApiKey()],
'headers' => ['Authorization' => 'Bearer ' . $this->client->getProjectApiKey()],
'body' => $data
];
$response = $this->client->getHttpClient()->request('POST', $path, $data);
Expand Down
2 changes: 1 addition & 1 deletion src/Akeneo/Crowdin/Api/DeleteDirectory.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function execute(): string
$parameters = ['name' => $this->directory];

$data = [
'headers' => ['authorization' => 'Bearer ' . $this->client->getProjectApiKey()],
'headers' => ['Authorization' => 'Bearer ' . $this->client->getProjectApiKey()],
'body' => $parameters
];
$response = $this->client->getHttpClient()->request('POST', $path, $data);
Expand Down
2 changes: 1 addition & 1 deletion src/Akeneo/Crowdin/Api/DeleteFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function execute(): string
$parameters = ['file' => $this->file];

$data = [
'headers' => ['authorization' => 'Bearer ' . $this->client->getProjectApiKey()],
'headers' => ['Authorization' => 'Bearer ' . $this->client->getProjectApiKey()],
'body' => $parameters
];
$response = $this->client->getHttpClient()->request('POST', $path, $data);
Expand Down
2 changes: 1 addition & 1 deletion src/Akeneo/Crowdin/Api/Download.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function execute(): string
}

$filePath = $this->getCopyDestination() . '/' . $this->getPackage();
$response = $this->client->getHttpClient()->request('GET', $path, ['headers' => ['authorization' => 'Bearer 1234']]);
$response = $this->client->getHttpClient()->request('GET', $path, ['headers' => ['Authorization' => 'Bearer 1234']]);

$fileContent = $response->getContent();
file_put_contents($filePath, $fileContent);
Expand Down
2 changes: 1 addition & 1 deletion src/Akeneo/Crowdin/Api/Export.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public function execute(): string
$response = $this->client->getHttpClient()->request(
'GET',
$path,
['headers' => ['authorization' => 'Bearer ' . $this->client->getProjectApiKey()]]
['headers' => ['Authorization' => 'Bearer ' . $this->client->getProjectApiKey()]]
);

return $response->getContent();
Expand Down
2 changes: 1 addition & 1 deletion src/Akeneo/Crowdin/Api/Info.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function execute(): string
$response = $this->client->getHttpClient()->request(
'GET',
$path,
['headers' => ['authorization' => 'Bearer ' . $this->client->getProjectApiKey()]]
['headers' => ['Authorization' => 'Bearer ' . $this->client->getProjectApiKey()]]
);

return $response->getContent();
Expand Down
2 changes: 1 addition & 1 deletion src/Akeneo/Crowdin/Api/LanguageStatus.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function execute()
$parameters = array_merge(
$this->parameters,
[
'headers' => ['authorization' => 'Bearer ' . $this->client->getProjectApiKey()],
'headers' => ['Authorization' => 'Bearer ' . $this->client->getProjectApiKey()],
'body' => ['language' => $this->getLanguage()]
]
);
Expand Down
2 changes: 1 addition & 1 deletion src/Akeneo/Crowdin/Api/Status.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function execute()
$response = $this->client->getHttpClient()->request(
'GET',
$path,
['headers' => ['authorization' => 'Bearer ' . $this->client->getProjectApiKey()]]
['headers' => ['Authorization' => 'Bearer ' . $this->client->getProjectApiKey()]]
);

return $response->getContent();
Expand Down
2 changes: 1 addition & 1 deletion src/Akeneo/Crowdin/Api/SupportedLanguages.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function execute()
$response = $http->request(
'GET',
$path,
['headers' => ['authorization' => 'Bearer ' . $this->client->getProjectApiKey()]]
['headers' => ['Authorization' => 'Bearer ' . $this->client->getProjectApiKey()]]
);

return $response->getContent();
Expand Down
2 changes: 1 addition & 1 deletion src/Akeneo/Crowdin/Api/UpdateFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public function execute(): string

$data = [
'headers' => [
'authorization' => 'Bearer ' . $this->client->getProjectApiKey(),
'Authorization' => 'Bearer ' . $this->client->getProjectApiKey(),
'Content-Type' => 'multipart/form-data'
],
'body' => $data
Expand Down
2 changes: 1 addition & 1 deletion src/Akeneo/Crowdin/Api/UploadTranslation.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function execute(): string

$data = [
'headers' => [
'authorization' => 'Bearer ' . $this->client->getProjectApiKey(),
'Authorization' => 'Bearer ' . $this->client->getProjectApiKey(),
'Content-Type' => 'multipart/form-data'
],
'body' => $data
Expand Down

0 comments on commit 27f12e4

Please sign in to comment.