Skip to content

Commit 59b9453

Browse files
committed
MTA-3315: Add an ability to update hardcoded ids in dataset
- change pattern for repositoryReplacer.xml file
1 parent 4c51ee8 commit 59b9453

File tree

3 files changed

+5
-11
lines changed

3 files changed

+5
-11
lines changed

Magento/Mtf/Config/FileResolver/Mask.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct($moduleResolver = null)
4444
*/
4545
public function get($filename, $scope)
4646
{
47-
$paths = $this->getPaths($filename, $scope);
47+
$paths = $this->getFileCollection($filename, $scope);
4848

4949
return new File($paths);
5050
}
@@ -56,7 +56,7 @@ public function get($filename, $scope)
5656
* @param string $scope
5757
* @return array
5858
*/
59-
protected function getPaths($filename, $scope)
59+
protected function getFileCollection($filename, $scope)
6060
{
6161
$paths = [];
6262
$modulesPath = $this->moduleResolver->getModulesPath();

Magento/Mtf/Repository/Config/FileResolver/Mask.php

+3-8
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,12 @@ public function __construct($moduleResolver = null, array $additionalFiles = [])
4040
* @param string $scope
4141
* @return array
4242
*/
43-
public function getPaths($filename, $scope)
43+
public function getFileCollection($filename, $scope)
4444
{
45-
$paths = parent::getPaths($filename, $scope);
45+
$paths = parent::getFileCollection($filename, $scope);
4646

4747
foreach ($this->additionalFiles as $file) {
48-
$mtfDefaultPath = dirname(dirname(dirname(dirname(dirname(__DIR__)))));
49-
$mtfDefaultPath = str_replace('\\', '/', $mtfDefaultPath);
50-
$mtfDefaultPath = str_replace(MTF_BP, '', $mtfDefaultPath);
51-
52-
$pattern = MTF_BP . '{' . $mtfDefaultPath . ',}' . '/' . $file;
53-
$paths = array_merge($paths, glob($pattern, GLOB_BRACE));
48+
$paths = array_merge($paths, glob(MTF_BP . '/' . $file));
5449
}
5550

5651
return $paths;

etc/di.xml

-1
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,6 @@
227227
</virtualType>
228228
<type name="Magento\Mtf\Repository\Config\FileResolver\Mask">
229229
<arguments>
230-
<argument name="moduleResolver" xsi:type="null" />
231230
<argument name="additionalFiles" xsi:type="array">
232231
<item name="0" xsi:type="string">etc/repositoryReplacer*.xml</item>
233232
</argument>

0 commit comments

Comments
 (0)