public function TokenEventTest::testTokenReplacementEventWrongReplacementException in Hook Event Dispatcher 8.2
Same name and namespace in other branches
- 3.x modules/core_event_dispatcher/tests/src/Unit/Token/TokenEventTest.php \Drupal\Tests\core_event_dispatcher\Unit\Token\TokenEventTest::testTokenReplacementEventWrongReplacementException()
Test TokenReplacementEvent wrong replacement exception.
File
- modules/
core_event_dispatcher/ tests/ src/ Unit/ Token/ TokenEventTest.php, line 171
Class
- TokenEventTest
- Class TokenEventTest.
Namespace
Drupal\Tests\core_event_dispatcher\Unit\TokenCode
public function testTokenReplacementEventWrongReplacementException() : void {
$metaData = $this
->createMock(BubbleableMetadata::class);
$event = new TokensReplacementEvent('', [], [], [], $metaData);
$this
->expectException(UnexpectedValueException::class);
$event
->setReplacementValue('', '', '');
}