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

Public Member Functions

 testStartTestEndTest ()
 

Protected Member Functions

 setUp ()
 
 tearDown ()
 

Detailed Description

Definition at line 15 of file AppConfigTest.php.

Member Function Documentation

◆ setUp()

setUp ( )
protected

Definition at line 22 of file AppConfigTest.php.

23  {
24  $this->model = new \Magento\TestFramework\Isolation\AppConfig();
25  }

◆ tearDown()

tearDown ( )
protected

Definition at line 27 of file AppConfigTest.php.

28  {
29  $this->model = null;
30  }

◆ testStartTestEndTest()

testStartTestEndTest ( )

Definition at line 32 of file AppConfigTest.php.

33  {
34  $test = $this->getMockBuilder(\PHPUnit\Framework\TestCase::class)
35  ->disableOriginalConstructor()
36  ->getMock();
37  $modelReflection = new \ReflectionClass($this->model);
38  $testAppConfigProperty = $modelReflection->getProperty('testAppConfig');
39  $testAppConfigProperty->setAccessible(true);
40  $testAppConfigMock = $this->getMockBuilder(\Magento\TestFramework\App\Config::class)
41  ->disableOriginalConstructor()
42  ->getMock();
43  $testAppConfigProperty->setValue($this->model, $testAppConfigMock);
44  $testAppConfigMock->expects($this->once())
45  ->method('clean');
46  $this->model->startTest($test);
47  }

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