Elgg\Notifications\NotificationsServiceTestCase::testRegisterEvent PHP Метод

testRegisterEvent() публичный Метод

public testRegisterEvent ( )
    public function testRegisterEvent()
    {
        $this->setupServices();
        $object = $this->getTestObject();
        $this->notifications->registerEvent($object->getType(), $object->getSubtype());
        $events = array($object->getType() => array($object->getSubtype() => array('create')));
        $this->assertEquals($events, $this->notifications->getEvents());
        $this->notifications->registerEvent($object->getType(), $object->getSubtype(), array('test_event'));
        $events[$object->getType()][$object->getSubtype()] = array('create', 'test_event');
        $this->assertEquals($events, $this->notifications->getEvents());
        $this->notifications->registerEvent($object->getType(), $object->getSubtype());
        $this->assertEquals($events, $this->notifications->getEvents());
    }