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\KernelCode
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',
]);
}