protected function setUp(): void
{ // Ensure that FileCacheFactory has a prefix.
FileCacheFactory::
setPrefix('prefix'
);
} /**
* Tests the YAML file discovery.
*/
public function testDiscovery() { vfsStreamWrapper::
register();
$root =
new vfsStreamDirectory('modules'
);
vfsStreamWrapper::
setRoot($root);
$url = vfsStream::
url('modules'
);
mkdir($url . '/test_1'
);
file_put_contents($url . '/test_1/test_1.test.yml', 'name: test'
);
file_put_contents($url . '/test_1/test_2.test.yml', 'name: test'
);
mkdir($url . '/test_2'
);
file_put_contents($url . '/test_2/test_3.test.yml', 'name: test'
);
// Write an empty YAML file.
file_put_contents($url . '/test_2/test_4.test.yml', ''
);