Exemplo n.º 1
0
 /**
  * Set up
  *
  * @return void
  */
 protected function setUp()
 {
     $this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
     $this->fileUtility = \Magento\Framework\App\Utility\Files::init();
     $this->validationStateMock = $this->getMockBuilder('Magento\\Framework\\Config\\ValidationStateInterface')->setMethods(['isValidationRequired'])->getMockForAbstractClass();
     $this->schemaLocatorMock = $this->getMockBuilder('Magento\\Config\\Model\\Config\\SchemaLocator')->disableOriginalConstructor()->setMethods(['getPerFileSchema'])->getMock();
     $this->fileResolverMock = $this->getMockBuilder('Magento\\Framework\\Config\\FileResolverInterface')->getMockForAbstractClass();
     $this->validationStateMock->expects($this->atLeastOnce())->method('isValidationRequired')->willReturn(false);
     $this->schemaLocatorMock->expects($this->atLeastOnce())->method('getPerFileSchema')->willReturn(false);
     /** @var \Magento\Paypal\Model\Config\Structure\Reader\ConverterStub $converter */
     $this->converter = $this->objectManager->create('Magento\\Paypal\\Model\\Config\\Structure\\Reader\\ConverterStub');
     $this->reader = $this->objectManager->create('Magento\\Paypal\\Model\\Config\\Structure\\Reader\\ReaderStub', ['fileResolver' => $this->fileResolverMock, 'converter' => $this->converter, 'schemaLocator' => $this->schemaLocatorMock, 'validationState' => $this->validationStateMock, 'fileName' => 'no_existing_file.xml', 'domDocumentClass' => 'Magento\\Framework\\Config\\Dom']);
 }