123456789101112131415161718192021222324252627282930 |
- <?php
- /**
- * Copyright © Magento, Inc. All rights reserved.
- * See COPYING.txt for license details.
- */
- namespace Magento\Framework\Cache\Test\Unit\Config;
- class ConverterTest extends \PHPUnit\Framework\TestCase
- {
- /**
- * @var \PHPUnit_Framework_MockObject_MockObject|\Magento\Framework\Cache\Config\Converter
- */
- protected $_model;
- protected function setUp()
- {
- $this->_model = new \Magento\Framework\Cache\Config\Converter();
- }
- public function testConvert()
- {
- $dom = new \DOMDocument();
- $xmlFile = __DIR__ . '/_files/cache_config.xml';
- $dom->loadXML(file_get_contents($xmlFile));
- $convertedFile = __DIR__ . '/_files/cache_config.php';
- $expectedResult = include $convertedFile;
- $this->assertEquals($expectedResult, $this->_model->convert($dom));
- }
- }
|