You are here

public function CollectPathsEventTest::testAddPaths in Tome 8

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

File

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

Class

CollectPathsEventTest
Tests collect paths event class.

Namespace

Drupal\Tests\tome_static\Kernel

Code

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