9 use Magento\Mtf\Console\Output;
10 use Magento\Mtf\ObjectManagerInterface;
11 use Symfony\Component\Console\Input\InputInterface;
12 use Symfony\Component\Console\Output\OutputInterface;
24 private $objectManager;
29 public function __construct(ObjectManagerInterface $objectManager)
31 parent::__construct();
43 $this->setName(
'troubleshooting:generate-static-classes')
44 ->setDescription(
'Generate static classes (Blocks, Pages, Repositories etc.).');
57 $output = $this->objectManager->create(
61 $output->writeln(
"Generating static classes...");
62 exec(
'php ' .
MTF_BP . DIRECTORY_SEPARATOR .
'utils' . DIRECTORY_SEPARATOR .
'generate.php', $error, $exitCode);
64 $output->outputMessages([
'error' => $error]);
66 $output->writeln(
'Static classes generation is finished.');
__construct(ObjectManagerInterface $objectManager)
exec($command, array &$output=null, &$return_var=null)
execute(InputInterface $input, OutputInterface $output)
defined('MTF_TESTS_PATH')||define('MTF_TESTS_PATH' MTF_BP