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

Public Member Functions

 testConstructor ()
 
 partialLoadAreaDataProvider ()
 

Detailed Description

Provide tests for \Magento\TestFramework\Application.

Definition at line 23 of file ApplicationTest.php.

Member Function Documentation

◆ partialLoadAreaDataProvider()

partialLoadAreaDataProvider ( )

Provide test data for testPartialLoadArea().

Returns
array

Definition at line 149 of file ApplicationTest.php.

150  {
151  return [
152  [
153  'area_code' => Area::AREA_GLOBAL,
154  ],
155  [
156  'area_code' => Area::AREA_WEBAPI_REST,
157  ],
158  [
159  'area_code' => Area::AREA_WEBAPI_SOAP,
160  ],
161  [
162  'area_code' => Area::AREA_CRONTAB,
163  ],
164  [
165  'area_code' => Area::AREA_GRAPHQL,
166  ],
167  ];
168  }

◆ testConstructor()

testConstructor ( )

@covers \Magento\TestFramework\Application::getTempDir @covers \Magento\TestFramework\Application::getDbInstance() @covers \Magento\TestFramework\Application::getInitParams()

Definition at line 66 of file ApplicationTest.php.

67  {
68  $this->assertEquals($this->tempDir, $this->subject->getTempDir(), 'Temp directory is not set in Application');
69 
70  $initParams = $this->subject->getInitParams();
71  $this->assertInternalType('array', $initParams, 'Wrong initialization parameters type');
72  $this->assertArrayHasKey(
74  $initParams,
75  'Directories are not configured'
76  );
77  $this->assertArrayHasKey(State::PARAM_MODE, $initParams, 'Application mode is not configured');
78  $this->assertEquals(
80  $initParams[State::PARAM_MODE],
81  'Wrong application mode configured'
82  );
83  }

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