You are here

public function CollectPathsEventTest::testReplacePath in Tome 8

@covers \Drupal\tome_static\Event\CollectPathsEvent::replacePath

File

modules/tome_static/tests/src/Kernel/CollectPathsEventTest.php, line 46

Class

CollectPathsEventTest
Tests collect paths event class.

Namespace

Drupal\Tests\tome_static\Kernel

Code

public function testReplacePath() {
  $this->eventDispatcher
    ->addListener($this->eventName, [
    $this,
    'replacePath',
  ]);
  $paths = $this
    ->collectPaths([
    '/my-path',
    '/another-path',
  ]);
  $this
    ->assertEquals(2, count($paths));
  $this
    ->assertUnsortedEquals($paths, [
    '/my-new-path',
    '/another-path',
  ]);
}