forked from magento/magento2-functional-testing-framework
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRoot.php
27 lines (23 loc) · 784 Bytes
/
Root.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php
/**
* Copyright © 2017 Magento. All rights reserved.
* See COPYING.txt for license details.
*/
namespace Magento\FunctionalTestingFramework\Config\FileResolver;
use Magento\FunctionalTestingFramework\Config\FileResolverInterface;
use Magento\FunctionalTestingFramework\Util\Iterator\File;
class Root implements FileResolverInterface
{
/**
* Retrieve the list of configuration files with given name that relate to specified scope at the tests level
*
* @param string $filename
* @param string $scope
* @return array|\Iterator,\Countable
*/
public function get($filename, $scope)
{
$paths = glob(dirname(TESTS_BP) . DIRECTORY_SEPARATOR . $scope . DIRECTORY_SEPARATOR . $filename);
return new File($paths);
}
}