You are here

XmlUtilityTest.php in Feeds extensible parsers 8

File

tests/src/Unit/Utility/XmlUtilityTest.php
View source
<?php

namespace Drupal\Tests\feeds_ex\Unit\Utility;

use Drupal\Tests\feeds_ex\Unit\UnitTestBase;
use Drupal\feeds_ex\Utility\XmlUtility;

/**
 * @coversDefaultClass \Drupal\feeds_ex\Utility\XmlUtility
 * @group feeds_ex
 */
class XmlUtilityTest extends UnitTestBase {

  /**
   * @covers ::decodeNamedHtmlEntities
   */
  public function testDecodeNamedHtmlEntities() {
    $xml = '<root>&Atilde;&amp;&lt;&gt;</root>';
    $utility = new XmlUtility();
    $xml = $utility
      ->decodeNamedHtmlEntities($xml);
    $this
      ->assertSame('<root>Ã&amp;&lt;&gt;</root>', $xml);
  }

}

Classes

Namesort descending Description
XmlUtilityTest @coversDefaultClass \Drupal\feeds_ex\Utility\XmlUtility @group feeds_ex