Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
PhpInformationTest.php
Go to the documentation of this file.
1 <?php
8 
9 use \Magento\Setup\Model\PhpInformation;
10 
14 class PhpInformationTest extends \PHPUnit\Framework\TestCase
15 {
17  {
18  $phpInformation = new PhpInformation();
19  $this->assertEquals(200, $phpInformation->getRequiredMinimumXDebugNestedLevel());
20  }
21 
22  public function testGetCurrent()
23  {
24  $phpInformation = new PhpInformation();
25 
26  // Class variable 'current' should be empty the first time
27  $this->assertAttributeEmpty('current', $phpInformation);
28  $actualExtensions = $phpInformation->getCurrent();
29  $this->assertTrue(is_array($actualExtensions));
30 
31  // Calling second type should cause class variable to be used
32  $this->assertSame($actualExtensions, $phpInformation->getCurrent());
33  $this->assertAttributeNotEmpty('current', $phpInformation);
34  }
35 }