You are here

protected function PathPlaceholderEventTest::pathPlaceholder in Tome 8

Triggers the path placeholder event and returns the updated event.

Parameters

string $path: (optional) The HTML path.

Return value

\Drupal\tome_static\Event\PathPlaceholderEvent The path placeholder event after it is triggered.

2 calls to PathPlaceholderEventTest::pathPlaceholder()
PathPlaceholderEventTest::testIsInvalid in modules/tome_static/tests/src/Kernel/PathPlaceholderEventTest.php
@covers \Drupal\tome_static\Event\PathPlaceholderEvent::setInvalid @covers \Drupal\tome_static\Event\PathPlaceholderEvent::isInvalid
PathPlaceholderEventTest::testSetPath in modules/tome_static/tests/src/Kernel/PathPlaceholderEventTest.php
@covers \Drupal\tome_static\Event\PathPlaceholderEvent::setPath @covers \Drupal\tome_static\Event\PathPlaceholderEvent::getPath

File

modules/tome_static/tests/src/Kernel/PathPlaceholderEventTest.php, line 52

Class

PathPlaceholderEventTest
Tests path placeholder event class.

Namespace

Drupal\Tests\tome_static\Kernel

Code

protected function pathPlaceholder($path = '/my-path/{placeholder}') {
  $event = new PathPlaceholderEvent($path);
  $this->eventDispatcher
    ->dispatch($this->eventName, $event);
  return $event;
}