You are here

protected function ModifyHtmlEventTest::modifyHtml in Tome 8

Triggers the modify HTML event and returns the updated event.

Parameters

string $html: (optional) The HTML content.

string $path: (optional) The HTML path.

Return value

\Drupal\tome_static\Event\ModifyHtmlEvent The modified HTML event after it is triggered.

4 calls to ModifyHtmlEventTest::modifyHtml()
ModifyHtmlEventTest::testAddExcludePath in modules/tome_static/tests/src/Kernel/ModifyHtmlEventTest.php
@covers \Drupal\tome_static\Event\ModifyHtmlEvent::addExcludePath @covers \Drupal\tome_static\Event\ModifyHtmlEvent::getExcludePaths
ModifyHtmlEventTest::testAddInvokePath in modules/tome_static/tests/src/Kernel/ModifyHtmlEventTest.php
@covers \Drupal\tome_static\Event\ModifyHtmlEvent::addInvokePath @covers \Drupal\tome_static\Event\ModifyHtmlEvent::getInvokePaths
ModifyHtmlEventTest::testGetPath in modules/tome_static/tests/src/Kernel/ModifyHtmlEventTest.php
@covers \Drupal\tome_static\Event\ModifyHtmlEvent::getPath
ModifyHtmlEventTest::testSetHtml in modules/tome_static/tests/src/Kernel/ModifyHtmlEventTest.php
@covers \Drupal\tome_static\Event\ModifyHtmlEvent::setHtml @covers \Drupal\tome_static\Event\ModifyHtmlEvent::getHtml

File

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

Class

ModifyHtmlEventTest
Tests modify HTML event class.

Namespace

Drupal\Tests\tome_static\Kernel

Code

protected function modifyHtml($html = 'HTML', $path = '/my-path') {
  $event = new ModifyHtmlEvent($html, $path);
  $this->eventDispatcher
    ->dispatch($this->eventName, $event);
  return $event;
}