enqueueEvent() public method

Add a notification event to the queue
public enqueueEvent ( string $action, string $type, ElggDat\ElggData $object ) : void
$action string Action name
$type string Type of the object of the action
$object ElggDat\ElggData The object of the action
return void
 public function testValidatesActorExistenceForDequeuedSubscriptionNotificationEvent()
 {
     // This test can be enabled once users table operations such as delete/ban are mocked
     $this->markTestSkipped();
     $object = $this->getTestObject();
     $mock = $this->getMock(SubscriptionsService::class, ['getSubscriptions'], [], '', false);
     $mock->expects($this->exactly(0))->method('getSubscriptions')->will($this->returnValue([]));
     $this->subscriptions = $mock;
     $this->setupServices();
     $this->notifications->registerMethod('test_method');
     $this->session->setLoggedInUser($this->actor);
     $this->notifications->registerEvent($object->getType(), $object->getSubtype(), ['test_event']);
     $this->notifications->enqueueEvent('test_event', $object->getType(), $object);
     $this->session->removeLoggedInUser();
     $actor->delete();
     $this->assertEquals(0, $this->notifications->processQueue($this->time + 10));
 }