You are here

public function PathPlaceholderEventTest::testSetPath in Tome 8

@covers \Drupal\tome_static\Event\PathPlaceholderEvent::setPath @covers \Drupal\tome_static\Event\PathPlaceholderEvent::getPath

File

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

Class

PathPlaceholderEventTest
Tests path placeholder event class.

Namespace

Drupal\Tests\tome_static\Kernel

Code

public function testSetPath() {
  $this->eventDispatcher
    ->addListener($this->eventName, [
    $this,
    'setPath',
  ]);
  $event = $this
    ->pathPlaceholder();
  $this
    ->assertEquals('/my-path-replaced', $event
    ->getPath());
}