ConverterTest.php 713 B

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