Esempio n. 1
0
 function testIgnoresReferenceFiles()
 {
     $this->params = array('project_name' => 'foo', 'target_lang' => 'it', 'source_lang' => 'en');
     $this->files[] = test_file_path('zip-with-reference-files.zip');
     $response = $this->makeRequest();
     $response = json_decode($response['body']);
     $this->assertEquals('Success', $response->message);
     $this->assertEquals('OK', $response->status);
     $this->assertNotNull($response->id_project);
     $this->assertNotNull($response->project_pass);
     $this->assertNotNull($response->analyze_url);
     $filesDao = new Files_FileDao(Database::obtain());
     $files = $filesDao->getByProjectId($response->id_project);
     $this->assertEquals(1, count($files));
     $this->assertEquals('zip-with-reference-files.zip___SEP___amex-test.docx.xlf', $files[0]['filename']);
 }
Esempio n. 2
0
 public function getFile()
 {
     return Files_FileDao::getByJobId($this->id);
 }