11 use Symfony\Component\Console\Tester\CommandTester;
27 $this->installerFactory = $this->createMock(\
Magento\Setup\Model\InstallerFactory::class);
28 $this->deploymentConfig = $this->createMock(\
Magento\Framework\
App\DeploymentConfig::class);
33 $this->deploymentConfig->expects($this->once())->method(
'isAvailable')->will($this->returnValue(
true));
35 $this->installerFactory->expects($this->once())->method(
'create')->will($this->returnValue(
$installer));
36 $installer->expects($this->once())->method(
'installDataFixtures');
38 $commandTester =
new CommandTester(
41 $commandTester->execute([]);
46 $this->deploymentConfig->expects($this->once())->method(
'isAvailable')->will($this->returnValue(
false));
47 $this->installerFactory->expects($this->never())->method(
'create');
49 $commandTester =
new CommandTester(
52 $commandTester->execute([]);
53 $this->assertStringMatchesFormat(
54 'No information is available: the Magento application is not installed.%w',
55 $commandTester->getDisplay()