![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/framework/App/Test/Unit/ResourceConnection/Config/ |
<?php /** * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ declare(strict_types=1); namespace Magento\Framework\App\Test\Unit\ResourceConnection\Config; use Magento\Framework\App\ResourceConnection\Config\Converter; use PHPUnit\Framework\TestCase; class ConverterTest extends TestCase { /** * @var Converter */ protected $_model; /** * @var string */ protected $_filePath; /** * @var \DOMDocument */ protected $_source; protected function setUp(): void { $this->_filePath = __DIR__ . '/_files/'; $this->_source = new \DOMDocument(); $this->_model = new Converter(); } public function testConvert() { $this->_source->loadXML(file_get_contents($this->_filePath . 'resources.xml')); $convertedFile = include $this->_filePath . 'resources.php'; $this->assertEquals($convertedFile, $this->_model->convert($this->_source)); } }