function it_export_the_package(InputInterface $input, OutputInterface $output, Export $api, CrowdinClient $client)
 {
     $client->api('export')->shouldBeCalled();
     $client->api('export')->willReturn($api);
     $this->setClient($client);
     $api->execute()->shouldBeCalled();
     $this->run($input, $output);
 }
 function it_deletes_a_directory(InputInterface $input, OutputInterface $output, DeleteDirectory $api, CrowdinClient $client)
 {
     $input->getArgument('directory')->willReturn('directory/to/delete');
     $client->api('delete-directory')->shouldBeCalled();
     $client->api('delete-directory')->willReturn($api);
     $this->setClient($client);
     $api->setDirectory('directory/to/delete')->shouldBeCalled();
     $api->execute()->shouldBeCalled();
     $this->run($input, $output);
 }
 function it_deletes_a_file(InputInterface $input, OutputInterface $output, DeleteFile $api, CrowdinClient $client)
 {
     $input->getArgument('file')->willReturn('/path/on/crowdin/messages.yml');
     $client->api('delete-file')->shouldBeCalled();
     $client->api('delete-file')->willReturn($api);
     $this->setClient($client);
     $api->setFile('/path/on/crowdin/messages.yml')->shouldBeCalled();
     $api->execute()->shouldBeCalled();
     $this->run($input, $output);
 }
 function it_downloads_the_package(InputInterface $input, OutputInterface $output, Download $api, CrowdinClient $client)
 {
     $input->getOption('path')->willReturn('/tmp/crowdin');
     $input->getOption('language')->willReturn('all');
     $client->api('download')->shouldBeCalled();
     $client->api('download')->willReturn($api);
     $this->setClient($client);
     $api->setCopyDestination('/tmp/crowdin')->shouldBeCalled();
     $api->setPackage('all.zip')->shouldBeCalled();
     $api->execute()->shouldBeCalled();
     $this->run($input, $output);
 }
 function it_adds_a_directory_recursively(InputInterface $input, OutputInterface $output, AddDirectory $api, CrowdinClient $client)
 {
     $input->getArgument('directory')->willReturn('directory/to/add');
     $client->api('add-directory')->shouldBeCalled();
     $client->api('add-directory')->willReturn($api);
     $this->setClient($client);
     $api->setDirectory('directory/')->shouldBeCalled();
     $api->setDirectory('directory/to/')->shouldBeCalled();
     $api->setDirectory('directory/to/add/')->shouldBeCalled();
     $api->execute()->shouldBeCalled();
     $this->run($input, $output);
 }
 function it_adds_a_file(InputInterface $input, OutputInterface $output, AddFile $api, CrowdinClient $client)
 {
     $input->getArgument('file')->willReturn('messages.yml');
     $input->getArgument('crowdinPath')->willReturn('path/on/crowdin');
     $input->getOption('exportPattern')->willReturn(null);
     $input->getOption('title')->willReturn(null);
     $client->api('add-file')->shouldBeCalled();
     $client->api('add-file')->willReturn($api);
     $this->setClient($client);
     $api->addTranslation('messages.yml', 'path/on/crowdin', null, null)->shouldBeCalled();
     $api->execute()->shouldBeCalled();
     $this->run($input, $output);
 }
 function it_deletes_a_file(InputInterface $input, OutputInterface $output, UploadTranslation $api, CrowdinClient $client)
 {
     $input->getArgument('locale')->willReturn('fr');
     $input->getArgument('file')->willReturn('/path/on/crowdin/messages.yml');
     $input->getArgument('translation')->willReturn('/locale/path/of/my/translation.fr.yml');
     $input->getOption('import-duplicates')->willReturn(true);
     $input->getOption('import-equal-suggestions')->willReturn(true);
     $input->getOption('auto-approve-imported')->willReturn(true);
     $client->api('upload-translation')->shouldBeCalled();
     $client->api('upload-translation')->willReturn($api);
     $this->setClient($client);
     $api->setLocale('fr')->shouldBeCalled();
     $api->addTranslation('/path/on/crowdin/messages.yml', '/locale/path/of/my/translation.fr.yml')->shouldBeCalled();
     $api->setDuplicatesImported(true)->shouldBeCalled();
     $api->setEqualSuggestionsImported(true)->shouldBeCalled();
     $api->setImportsAutoApproved(true)->shouldBeCalled();
     $api->execute()->shouldBeCalled();
     $this->run($input, $output);
 }