Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ReinstallInstanceTest.php
Go to the documentation of this file.
1 <?php
7 
9 
15 class ReinstallInstanceTest extends \PHPUnit\Framework\TestCase
16 {
20  private $model;
21 
25  private $objectManagerHelper;
26 
30  private $applicationMock;
31 
32  protected function setUp()
33  {
34  $this->applicationMock = $this
35  ->getMockBuilder(\Magento\TestFramework\Application::class)
36  ->disableOriginalConstructor()
37  ->getMock();
38 
39  $this->objectManagerHelper = new ObjectManagerHelper($this);
40  $this->model = $this->objectManagerHelper->getObject(
41  \Magento\TestFramework\Annotation\ReinstallInstance::class,
42  [
43  'application' => $this->applicationMock
44  ]
45  );
46  }
47 
48  public function testEndTest()
49  {
50  $this->applicationMock->expects($this->once())
51  ->method('cleanup');
52  $this->model->endTest();
53  }
54 }