Skip to content

Commit 57ffc5c

Browse files
author
Bohdan Korablov
committed
MAGETWO-55983: Stabilize Extension Manager functional test
1 parent 8daf9a8 commit 57ffc5c

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

dev/tests/functional/tests/app/Magento/Setup/Test/Constraint/Extension/AssertSelectSeveralExtensions.php

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,26 @@ public function processAssert(InstallGrid $grid, array $extensions)
2727
$extensions = $grid->selectSeveralExtensions($extensions);
2828
\PHPUnit_Framework_Assert::assertEmpty(
2929
$extensions,
30-
'Next extensions are not found on the grid: ' . implode(', ', $extensions)
30+
'Next extensions are not found on the grid: ' . $this->getExtensionsNames($extensions)
3131
);
3232
}
3333

34+
/**
35+
* Get names of extensions.
36+
*
37+
* @param Extension[] $extensions
38+
* @return string
39+
*/
40+
protected function getExtensionsNames(array $extensions)
41+
{
42+
$result = [];
43+
foreach ($extensions as $extension) {
44+
$result[] = $extension->getExtensionName();
45+
}
46+
47+
return implode(', ', $result);
48+
}
49+
3450
/**
3551
* Returns a string representation of successful assertion.
3652
*

0 commit comments

Comments
 (0)