You are here

public function ModifyHtmlEventTest::testSetHtml in Tome 8

@covers \Drupal\tome_static\Event\ModifyHtmlEvent::setHtml @covers \Drupal\tome_static\Event\ModifyHtmlEvent::getHtml

File

modules/tome_static/tests/src/Kernel/ModifyHtmlEventTest.php, line 35

Class

ModifyHtmlEventTest
Tests modify HTML event class.

Namespace

Drupal\Tests\tome_static\Kernel

Code

public function testSetHtml() {
  $this->eventDispatcher
    ->addListener($this->eventName, [
    $this,
    'setHtml',
  ]);
  $event = $this
    ->modifyHtml();
  $this
    ->assertEquals('NEW-HTML', $event
    ->getHtml());
}