|
@@ 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, |
| 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 testImport() |
| 52 |
|
{ |
|
@@ 51-63 (lines=13) @@
|
| 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 testImport() |
| 52 |
|
{ |
| 53 |
|
$this->commandTester->execute(array( |
| 54 |
|
'command' => 'itkg_translation:translation:converter', |
| 55 |
|
'--input' => 'csv', |
| 56 |
|
'--output' => 'yml', |
| 57 |
|
'--path' => $this->importPath, |
| 58 |
|
'--output-path' => $this->exportPath |
| 59 |
|
)); |
| 60 |
|
|
| 61 |
|
$this->assertEquals(file_get_contents($this->exportPath.'/domain.en.yml'), file_get_contents($this->importPath.'/result/domain.en.yml')); |
| 62 |
|
$this->assertEquals(file_get_contents($this->exportPath.'/messages.fr.yml'), file_get_contents($this->importPath.'/result/messages.fr.yml')); |
| 63 |
|
} |
| 64 |
|
} |
| 65 |
|
|