8 use Symfony\Component\Console\Tester\CommandTester;
25 $this->tester =
new CommandTester($this->command);
30 $property = new \ReflectionProperty(\
Magento\Setup\
Module\I18n\ServiceLocator::class,
'_dictionaryGenerator');
31 $property->setAccessible(
true);
32 $property->setValue(
null);
33 $property->setAccessible(
false);
38 $this->tester->execute(
40 'directory' =>
BP .
'/dev/tests/integration/testsuite/Magento/Setup/Console/Command/_files/',
44 $this->assertEquals(
'Dictionary successfully processed.' . PHP_EOL, $this->tester->getDisplay());
49 $outputPath =
BP .
'/dev/tests/integration/testsuite/Magento/Setup/Console/Command/_files/output/phrases.csv';
50 $this->tester->execute(
52 'directory' =>
BP .
'/dev/tests/integration/testsuite/Magento/Setup/Console/Command/_files/phrases/',
53 '--output' => $outputPath,
60 BP .
'/dev/tests/integration/testsuite/Magento/Setup/Console/Command/_files/expectedPhrases.csv' 62 $this->assertEquals($expected,
$output);
72 $this->tester->execute(
74 'directory' =>
BP .
'/dev/tests/integration/testsuite/Magento/Setup/Console/Command/_files/non_exist',
85 $this->tester->execute([
'directory' =>
'a',
'--magento' =>
true]);
94 $this->tester->execute([]);
testExecuteNonExistingPath()
testExecuteConsoleOutput()
testExecuteNoMagentoFlagNoDirectoryPath()
testExecuteMagentoFlagDirectoryPath()