File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
setup/src/Magento/Setup/Test/Unit/Model Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,15 @@ public function testGetRequiredMinimumXDebugNestedLevel()
22
22
public function testGetCurrent ()
23
23
{
24
24
$ phpInformation = new PhpInformation ();
25
- $ this ->assertEquals (get_loaded_extensions (), $ phpInformation ->getCurrent ());
25
+ $ loadedExtensions = array_map ('strtolower ' , get_loaded_extensions ());
26
+
27
+ // Class variable 'current' should be empty the first time
28
+ $ this ->assertAttributeEmpty ('current ' , $ phpInformation );
29
+ $ actualExtensions = $ phpInformation ->getCurrent ();
30
+ $ this ->assertEquals ($ loadedExtensions , $ actualExtensions );
31
+
32
+ // Calling second type should cause class variable to be used
33
+ $ this ->assertSame ($ actualExtensions , $ phpInformation ->getCurrent ());
34
+ $ this ->assertAttributeNotEmpty ('current ' , $ phpInformation );
26
35
}
27
36
}
You can’t perform that action at this time.
0 commit comments