Elgg\Notifications\NotificationsServiceTestCase::testProcessQueueTimesout PHP Method

testProcessQueueTimesout() public method

    public function testProcessQueueTimesout()
    {
        $mock = $this->getMock(SubscriptionsService::class, ['getSubscriptions'], [], '', false);
        $mock->expects($this->exactly(0))->method('getSubscriptions')->will($this->returnValue([]));
        $this->subscriptions = $mock;
        $this->setupServices();
        $object = $this->getTestObject();
        $this->session->setLoggedInUser($this->actor);
        $this->notifications->registerEvent($object->getType(), $object->getSubtype(), ['event1', 'event2', 'event3']);
        $this->notifications->enqueueEvent('event1', $object->getType(), $object);
        $this->notifications->enqueueEvent('event2', $object->getType(), $object);
        $this->notifications->enqueueEvent('event3', $object->getType(), $object);
        $this->session->removeLoggedInUser();
        $this->assertEquals(0, $this->notifications->processQueue($this->time));
    }