Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions
StorefrontAnalyzer Class Reference
Inheritance diagram for StorefrontAnalyzer:

Public Member Functions

 __construct (ObjectManagerInterface $objectManager, UrlAnalyzer $urlAnalyzer, CurlTransport $curlTransport)
 

Protected Member Functions

 configure ()
 
 execute (InputInterface $input, OutputInterface $output)
 

Detailed Description

Analyze URL specified in the phpunit.xml.

Definition at line 19 of file StorefrontAnalyzer.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( ObjectManagerInterface  $objectManager,
UrlAnalyzer  $urlAnalyzer,
CurlTransport  $curlTransport 
)
Parameters
ObjectManagerInterface$objectManager
UrlAnalyzer$urlAnalyzer
CurlTransport$curlTransport

Definition at line 47 of file StorefrontAnalyzer.php.

51  {
52  parent::__construct();
53  $this->objectManager = $objectManager;
54  $this->urlAnalyzer = $urlAnalyzer;
55  $this->curlTransport = $curlTransport;
56  }
$objectManager
Definition: bootstrap.php:17

Member Function Documentation

◆ configure()

configure ( )
protected

Configure command.

Returns
void

Definition at line 63 of file StorefrontAnalyzer.php.

64  {
65  parent::configure();
66  $this->setName('troubleshooting:check-magento-storefront')
67  ->setDescription('Check that app_frontend_url config is correct and Magento installed.');
68  }

◆ execute()

execute ( InputInterface  $input,
OutputInterface  $output 
)
protected

Execute command.

Parameters
InputInterface$input
OutputInterface$output
Returns
void @SuppressWarnings(PHPMD.UnusedFormalParameter)

Definition at line 78 of file StorefrontAnalyzer.php.

79  {
80  \PHPUnit\Util\Configuration::getInstance(MTF_PHPUNIT_FILE)->handlePHPConfiguration();
81  $output = $this->objectManager->create(
82  \Magento\Mtf\Console\Output::class,
83  ['output' => $output]
84  );
85  $output->writeln("Verifying Magento Storefront...");
86  $storefrontUrlAnalyzerMessages = $this->runStorefrontUrlAnalyzer();
87  if (isset($storefrontUrlAnalyzerMessages['error']) === false) {
88  $output->outputMessages($this->urlAnalyzer->fixLastSlash('app_frontend_url'));
89  $output->outputMessages($this->urlAnalyzer->checkDomain($_ENV['app_frontend_url']));
90  } else {
91  $output->outputMessages($storefrontUrlAnalyzerMessages);
92  }
93  $output->writeln("Storefront verification finished.");
94  }

The documentation for this class was generated from the following file: