Skip to content

Create Test Notifications

There is a command to quickly create notifications for testing locally. It will send all notifications for the event you specify in the same way that triggering the event in the app would, e.g. if you create an 'assign' event, it will send a notification to the assignee.

Usage

To see a description of the command and its options:

docker exec app bash -c 'php console/cli.php app:dev:create-notifications --help'

Exactly what you need to pass to --data will vary depending on the event you want to trigger notifications for. Note that --data is a json string and needs to be escaped twice, once for the ' around the --data value and once for the " in the json.

Example

To create system notifications:

docker exec app bash -c 'php console/cli.php app:dev:create-notifications --event-name=app.system.system_notification_created --member-name='\''Admin Member'\'' --data='\''{\"content\":\"This is a system notification\", \"url\":\"http://google.com\", \"type\":1}'\'''
Last modified by: Unknown