ConverterTest.php 796 B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Integration\Test\Unit\Model\Config;
  7. use \Magento\Integration\Model\Config\Converter;
  8. /**
  9. * Test for conversion of integration XML config into array representation.
  10. */
  11. class ConverterTest extends \PHPUnit\Framework\TestCase
  12. {
  13. /**
  14. * @var Converter
  15. */
  16. protected $model;
  17. protected function setUp()
  18. {
  19. $this->model = new Converter();
  20. }
  21. public function testConvert()
  22. {
  23. $inputData = new \DOMDocument();
  24. $inputData->load(__DIR__ . '/_files/config.xml');
  25. $expectedResult = require __DIR__ . '/_files/integration.php';
  26. $this->assertEquals($expectedResult, $this->model->convert($inputData));
  27. }
  28. }