type = 'api.info'; $notification->message = '

some notification

'; $notification->userGroups = ['superadmins']; $request = new NotificationsSendRequest(); $request->notification = $notification; $mock = static::createApiMockBuilder('notifications/send'); $mock->matchMethod(RequestMethod::POST) ->matchBody(self::encodeForm($request)) ->reply(200) ->withBody($json); $client = TestClientFactory::createClient($mock->getClient()); $response = $client->notifications->send($request); self::assertModelEqualsToResponse($json, $response); } }