|
@@ 37-49 (lines=13) @@
|
| 34 |
|
$this->commandTester = new CommandTester($this->command); |
| 35 |
|
} |
| 36 |
|
|
| 37 |
|
public function testExport() |
| 38 |
|
{ |
| 39 |
|
$this->commandTester->execute(array( |
| 40 |
|
'command' => 'itkg_translation:translation:converter', |
| 41 |
|
'--input' => 'yml', |
| 42 |
|
'--output' => 'csv', |
| 43 |
|
'--path' => $this->importPath.'/data', |
| 44 |
|
'--output-path' => $this->exportPath |
| 45 |
|
)); |
| 46 |
|
|
| 47 |
|
$this->assertEquals(file_get_contents($this->exportPath.'/domain.en.csv'), file_get_contents($this->importPath.'/result/domain.en.csv')); |
| 48 |
|
$this->assertEquals(file_get_contents($this->exportPath.'/messages.fr.csv'), file_get_contents($this->importPath.'/result/messages.fr.csv')); |
| 49 |
|
} |
| 50 |
|
|
| 51 |
|
public function testExportSpecificDomain() |
| 52 |
|
{ |
|
@@ 66-78 (lines=13) @@
|
| 63 |
|
$this->assertEquals(file_get_contents($this->exportPath.'/domain/domain.en.csv'), file_get_contents($this->importPath.'/result/domain.en.csv')); |
| 64 |
|
} |
| 65 |
|
|
| 66 |
|
public function testImport() |
| 67 |
|
{ |
| 68 |
|
$this->commandTester->execute(array( |
| 69 |
|
'command' => 'itkg_translation:translation:converter', |
| 70 |
|
'--input' => 'csv', |
| 71 |
|
'--output' => 'yml', |
| 72 |
|
'--path' => $this->importPath.'/data', |
| 73 |
|
'--output-path' => $this->exportPath |
| 74 |
|
)); |
| 75 |
|
|
| 76 |
|
$this->assertEquals(file_get_contents($this->exportPath.'/domain.en.yml'), file_get_contents($this->importPath.'/result/domain.en.yml')); |
| 77 |
|
$this->assertEquals(file_get_contents($this->exportPath.'/messages.fr.yml'), file_get_contents($this->importPath.'/result/messages.fr.yml')); |
| 78 |
|
} |
| 79 |
|
} |
| 80 |
|
|