Example #1
0
 protected function setUp()
 {
     $fixturePath = realpath(__DIR__ . '/_files') . '/';
     $this->_fileList = [file_get_contents($fixturePath . 'config_one.xml'), file_get_contents($fixturePath . 'config_two.xml')];
     $this->_fileResolverMock = $this->getMockBuilder('Magento\\Framework\\App\\Arguments\\FileResolver\\Primary')->disableOriginalConstructor()->setMethods(['get'])->getMock();
     $this->_fileResolverMock->expects($this->once())->method('get')->will($this->returnValue($this->_fileList));
     $this->_converter = new \Magento\Framework\Api\ExtensionAttribute\Config\Converter();
     $this->_validationState = new \Magento\Framework\App\Arguments\ValidationState(\Magento\Framework\App\State::MODE_DEFAULT);
     $this->_schemaLocator = new \Magento\Framework\Api\ExtensionAttribute\Config\SchemaLocator();
 }
Example #2
0
 protected function setUp()
 {
     $fixturePath = realpath(__DIR__ . '/../../_files') . '/';
     $this->_fileList = [file_get_contents($fixturePath . 'config_one.xml'), file_get_contents($fixturePath . 'config_two.xml')];
     $this->_fileResolverMock = $this->getMock('Magento\\Framework\\App\\Arguments\\FileResolver\\Primary', [], [], '', false);
     $this->_fileResolverMock->expects($this->once())->method('get')->will($this->returnValue($this->_fileList));
     $this->_mapper = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Framework\\ObjectManager\\Config\\Mapper\\Dom');
     $this->_validationState = new \Magento\Framework\App\Arguments\ValidationState(\Magento\Framework\App\State::MODE_DEFAULT);
     $this->_schemaLocator = new \Magento\Framework\ObjectManager\Config\SchemaLocator();
     $this->_mergedConfig = new \DOMDocument();
     $this->_mergedConfig->load($fixturePath . 'config_merged.xml');
 }