Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Data Structures | Public Member Functions | Data Fields
Bootstrap Class Reference

Data Structures

class  SetupDocBlock
 

Public Member Functions

 __construct (\Magento\TestFramework\Bootstrap\Settings $settings, \Magento\TestFramework\Bootstrap\Environment $envBootstrap, \Magento\TestFramework\Bootstrap\DocBlock $docBlockBootstrap, \Magento\TestFramework\Bootstrap\Profiler $profilerBootstrap, \Magento\Framework\Shell $shell, \Magento\TestFramework\Application $application, \Magento\TestFramework\Bootstrap\MemoryFactory $memoryFactory)
 
 getApplication ()
 
 runBootstrap ()
 

Data Fields

const ADMIN_NAME = 'user'
 
const ADMIN_PASSWORD = 'password1'
 
const ADMIN_EMAIL = '[email protected]'
 
const ADMIN_FIRSTNAME = 'firstname'
 
const ADMIN_LASTNAME = 'lastname'
 
const ADMIN_ROLE_NAME = 'Administrators'
 

Detailed Description

Definition at line 12 of file Bootstrap.php.

Constructor & Destructor Documentation

◆ __construct()

Constructor

Parameters
\Magento\TestFramework\Bootstrap\Settings$settings
\Magento\TestFramework\Bootstrap\Environment$envBootstrap
\Magento\TestFramework\Bootstrap\DocBlock$docBlockBootstrap
\Magento\TestFramework\Bootstrap\Profiler$profilerBootstrap
\Magento\Framework\Shell$shell
Application$application
Bootstrap\MemoryFactory$memoryFactory

Definition at line 76 of file Bootstrap.php.

84  {
85  $this->_settings = $settings;
86  $this->_envBootstrap = $envBootstrap;
87  $this->_docBlockBootstrap = $docBlockBootstrap;
88  $this->_profilerBootstrap = $profilerBootstrap;
89  $this->_shell = $shell;
90  $this->_application = $application;
91  $this->memoryFactory = $memoryFactory;
92  }
if(!file_exists($installConfigFile)) if(!defined('TESTS_INSTALLATION_DB_CONFIG_FILE')) $shell
Definition: bootstrap.php:46
$application
Definition: bootstrap.php:58
$settings
Definition: bootstrap.php:29

Member Function Documentation

◆ getApplication()

getApplication ( )

Retrieve the application instance

Returns
Application

Definition at line 99 of file Bootstrap.php.

100  {
101  return $this->_application;
102  }

◆ runBootstrap()

runBootstrap ( )

Perform bootstrap actions required to completely setup the testing environment

Definition at line 107 of file Bootstrap.php.

108  {
109  $this->_envBootstrap->emulateHttpRequest($_SERVER);
110  $this->_envBootstrap->emulateSession($_SESSION);
111 
112  $profilerOutputFile = $this->_settings->getAsFile('TESTS_PROFILER_FILE');
113  if ($profilerOutputFile) {
114  $this->_profilerBootstrap->registerFileProfiler($profilerOutputFile);
115  }
116 
117  $profilerBambooOutputFile = $this->_settings->getAsFile('TESTS_BAMBOO_PROFILER_FILE');
118  $profilerBambooMetricsFile = $this->_settings->getAsFile('TESTS_BAMBOO_PROFILER_METRICS_FILE');
119  if ($profilerBambooOutputFile && $profilerBambooMetricsFile) {
120  $this->_profilerBootstrap->registerBambooProfiler($profilerBambooOutputFile, $profilerBambooMetricsFile);
121  }
122 
123  $memoryBootstrap = $this->memoryFactory->create(
124  $this->_settings->get('TESTS_MEM_USAGE_LIMIT', 0),
125  $this->_settings->get('TESTS_MEM_LEAK_LIMIT', 0)
126  );
127  $memoryBootstrap->activateStatsDisplaying();
128  $memoryBootstrap->activateLimitValidation();
129 
130  $this->_docBlockBootstrap->registerAnnotations($this->_application);
131  }

Field Documentation

◆ ADMIN_EMAIL

const ADMIN_EMAIL = '[email protected]'

Definition at line 19 of file Bootstrap.php.

◆ ADMIN_FIRSTNAME

const ADMIN_FIRSTNAME = 'firstname'

Definition at line 20 of file Bootstrap.php.

◆ ADMIN_LASTNAME

const ADMIN_LASTNAME = 'lastname'

Definition at line 21 of file Bootstrap.php.

◆ ADMIN_NAME

const ADMIN_NAME = 'user'

#+ Predefined admin user credentials

Definition at line 17 of file Bootstrap.php.

◆ ADMIN_PASSWORD

const ADMIN_PASSWORD = 'password1'

Definition at line 18 of file Bootstrap.php.

◆ ADMIN_ROLE_NAME

const ADMIN_ROLE_NAME = 'Administrators'

#- Predefined admin user role name

Definition at line 27 of file Bootstrap.php.


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