PHPUnit analyzer based on the URL specified in the phpunit.xml.
Definition at line 16 of file PhpUnitAnalyzer.php.
◆ __construct()
__construct |
( |
ObjectManagerInterface |
$objectManager | ) |
|
- Parameters
-
ObjectManagerInterface | $objectManager | |
Definition at line 28 of file PhpUnitAnalyzer.php.
30 parent::__construct();
◆ configure()
Configure command.
- Returns
- void
Definition at line 39 of file PhpUnitAnalyzer.php.
42 $this->setName(
'troubleshooting:check-phpunit-config-file')
43 ->setDescription(
'Check if phpunit file is available.');
◆ execute()
execute |
( |
InputInterface |
$input, |
|
|
OutputInterface |
$output |
|
) |
| |
|
protected |
Execute command for checkout phpunit.xml config file availability.
- Parameters
-
InputInterface | $input | |
OutputInterface | $output | |
- Returns
- void @SuppressWarnings(PHPMD.UnusedFormalParameter)
Definition at line 54 of file PhpUnitAnalyzer.php.
56 $output = $this->objectManager->create(
60 $output->writeln(
"Checking phpunit.xml file availability...");
62 $configFileExists =
false;
63 if (file_exists(MTF_PHPUNIT_FILE)) {
64 $configFileExists =
true;
66 if (file_exists(MTF_PHPUNIT_FILE .
'.dist')) {
67 if (!copy(MTF_PHPUNIT_FILE .
'.dist', MTF_PHPUNIT_FILE)) {
68 $messages[
'error'][] =
'Failed to copy phpunit.xml.dist to phpunit.xml.';
70 $messages[
'info'][] =
'phpunit.xml file has been created based on phpunit.xml.dist. ' 71 .
'Please, adjust your PHPUnit configuration to use new file.';
72 $configFileExists =
true;
76 if (!$configFileExists) {
77 $messages[
'error'][] =
'Cannot define phpunit configuration path.';
79 $output->outputMessages($messages);
80 $output->writeln(
"phpunit.xml check finished.");
The documentation for this class was generated from the following file:
- vendor/magento/magento2-base/dev/tests/functional/lib/Magento/Mtf/Troubleshooting/PhpUnitAnalyzer.php