You are here

public function MockGcEventSubscriber::postNodeSave in GatherContent 8.4

Post Node Save event listener.

File

tests/modules/gathercontent_test/src/EventSubscriber/MockGcEventSubscriber.php, line 44

Class

MockGcEventSubscriber
Class for testing events.

Namespace

Drupal\gathercontent_test\EventSubscriber

Code

public function postNodeSave(PostNodeSaveEvent $event) {
  $node = $event
    ->getNode();
  TestCase::assertFalse($node
    ->isNew(), 'The event was recieved before the entity got saved.');
  static::$postNodeSaveCalled++;
}