You are here

public function DomHelperTraitTest::testChangeNodeName in Embed 8

Tests DomHelperTrait::changeNodeName().

File

tests/src/Unit/DomHelperTraitTest.php, line 43

Class

DomHelperTraitTest
Tests \Drupal\embed\DomHelperTrait.

Namespace

Drupal\Tests\embed\Unit

Code

public function testChangeNodeName() {
  $this
    ->changeNodeName($this->node, 'tested');
  $this
    ->assertEquals($this->node->tagName, 'tested');
  $this
    ->assertEquals(Html::serialize($this->document), '<outer><tested foo="bar" namespace:foo="bar"><test bar="foo"></test></tested></outer>');
}