You are here

public function TokenEventTest::testTokenReplacementEventWrongReplacementException in Hook Event Dispatcher 8

Test TokenReplacementEvent wrong replacement exception.

File

tests/src/Unit/Token/TokenEventTest.php, line 191

Class

TokenEventTest
Class TokenEventTest.

Namespace

Drupal\Tests\hook_event_dispatcher\Unit\Token

Code

public function testTokenReplacementEventWrongReplacementException() {
  $metaData = $this
    ->createMock(BubbleableMetadata::class);
  $event = new TokensReplacementEvent('', [], [], [], $metaData);
  $this
    ->setExpectedException(\UnexpectedValueException::class);
  $event
    ->setReplacementValue('', '', '');
}