Skip to content

Commit e01c2f1

Browse files
committed
MAGETWO-37710: Setup wizard fails in readiness check when magento is deployed by composer create-project
- Fix PhpInformation test to lowecase extension names and verify caching behavior
1 parent 12acbe4 commit e01c2f1

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

setup/src/Magento/Setup/Test/Unit/Model/PhpInformationTest.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@ public function testGetRequiredMinimumXDebugNestedLevel()
2222
public function testGetCurrent()
2323
{
2424
$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);
2635
}
2736
}

0 commit comments

Comments
 (0)