public function EntityEventTest::testEntityTranslationDeleteEvent in Hook Event Dispatcher 3.x
Same name and namespace in other branches
- 8.2 modules/core_event_dispatcher/tests/src/Unit/Entity/EntityEventTest.php \Drupal\Tests\core_event_dispatcher\Unit\Entity\EntityEventTest::testEntityTranslationDeleteEvent()
Test EntityTranslationDeleteEvent.
File
- modules/
core_event_dispatcher/ tests/ src/ Unit/ Entity/ EntityEventTest.php, line 120
Class
- EntityEventTest
- Class EntityEventTest.
Namespace
Drupal\Tests\core_event_dispatcher\Unit\EntityCode
public function testEntityTranslationDeleteEvent() : void {
$entity = $this
->createMock(EntityInterface::class);
core_event_dispatcher_entity_translation_delete($entity);
/** @var \Drupal\core_event_dispatcher\Event\Entity\EntityTranslationDeleteEvent $event */
$event = $this->manager
->getRegisteredEvent(HookEventDispatcherInterface::ENTITY_TRANSLATION_DELETE);
self::assertSame($entity, $event
->getEntity());
}