You are here

public function CollectPathsEventTest::testReplacePaths in Tome 8

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

File

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

Class

CollectPathsEventTest
Tests collect paths event class.

Namespace

Drupal\Tests\tome_static\Kernel

Code

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