Exemplo n.º 1
0
 public function testSubmitTranslation()
 {
     $text = 'In the era of Siri';
     $source_language = 'en';
     $target_language = 'pt';
     $res = $this->unbabel->submitTranslation($text, $target_language);
     $json = $res->json();
     $this->checkSubmissionProgress(array($json['uid']));
 }
Exemplo n.º 2
0
 public function testItShouldSubmitATranslation()
 {
     $post_data = $this->getRequestObject('Unbabel test string', 'en', 'pl');
     $this->httpDriver->expects($this->once())->method('post')->with($this->unbabel->buildRequestUrl('/translation/'), $this->unbabel->getHeaders(), json_encode($post_data));
     $this->unbabel->submitTranslation('Unbabel test string', 'pl', array('source_language' => 'en', 'callback_url' => 'http://unbabel.com/', 'formality' => 'Informal', 'instructions' => 'Go out of you way to be kind to somebody today.', 'text_format' => 'text'));
 }