Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SectionConfigConverterTest.php
Go to the documentation of this file.
1 <?php
8 
10 
11 class SectionConfigConverterTest extends \PHPUnit\Framework\TestCase
12 {
14  protected $converter;
15 
18 
20  protected $source;
21 
22  protected function setUp()
23  {
24  $this->source = new \DOMDocument();
25  $this->objectManagerHelper = new ObjectManagerHelper($this);
26  $this->converter = $this->objectManagerHelper->getObject(
27  \Magento\Customer\CustomerData\SectionConfigConverter::class
28  );
29  }
30 
31  public function testConvert()
32  {
33  $this->source->loadXML(file_get_contents(__DIR__ . '/_files/sections.xml'));
34 
35  $this->assertEquals(
36  [
37  'sections' => [
38  'customer/account/logout' => '*',
39  'customer/account/editpost' => ['account'],
40  ],
41  ],
42  $this->converter->convert($this->source)
43  );
44  }
45 }
defined('TESTS_BP')||define('TESTS_BP' __DIR__
Definition: _bootstrap.php:60