/** * @param \Magento\Framework\Filesystem\DirectoryList $directoryList */ public function __construct(\Magento\Framework\Filesystem\DirectoryList $directoryList) { $etcDir = $directoryList->getDir(\Magento\Framework\App\Filesystem::LIB_INTERNAL) . '/Magento/Framework/Mview/etc'; $this->_schema = $etcDir . '/mview.xsd'; $this->_perFileSchema = $etcDir . '/mview.xsd'; }
/** * Test for getting directory path from DirectoryList */ public function testGetDir() { $newRoot = __DIR__ . '/root'; $newMedia = __DIR__ . '/media'; $dir = new DirectoryList(__DIR__, array(AppFilesystem::ROOT_DIR => array('path' => $newRoot), AppFilesystem::MEDIA_DIR => array('path' => $newMedia), 'custom' => array('path' => 'test2'))); $this->assertEquals('test2', $dir->getDir('custom')); $this->assertEquals(str_replace('\\', '/', $newRoot), $dir->getConfig(AppFilesystem::ROOT_DIR)['path']); $this->assertEquals(str_replace('\\', '/', $newMedia), $dir->getConfig(AppFilesystem::MEDIA_DIR)['path']); }