2 namespace wcf\system\user\notification\event;
3 use wcf\data\comment\response\LikeableCommentResponse;
4 use wcf\data\user\UserProfile;
5 use wcf\system\user\notification\object\IUserNotificationObject;
8 * Default implementation of some methods of the testable user notification event interface
9 * for comment response like user notificiation events.
11 * @author Matthias Schmidt
12 * @copyright 2001-2017 WoltLab GmbH
13 * @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
14 * @package WoltLabSuite\Core\System\User\Notification\Event
17 trait TTestableCommentResponseLikeUserNotificationEvent {
18 use TTestableCommentResponseUserNotificationEvent;
19 use TTestableLikeUserNotificationEvent {
20 TTestableLikeUserNotificationEvent::canBeTriggeredByGuests insteadof TTestableCommentResponseUserNotificationEvent;
21 TTestableLikeUserNotificationEvent::getTestObjects insteadof TTestableCommentResponseUserNotificationEvent;
27 protected static function createTestLikeObject(UserProfile $recipient, UserProfile $author) {
28 return new LikeableCommentResponse(self::createTestCommentResponse($recipient, $author));
34 public static function getTestAdditionalData(IUserNotificationObject $object) {
35 /** @var LikeableCommentResponse $likedObject */
36 $likedObject = self::getTestLikeObject($object);
39 'commentID' => $likedObject->getComment()->commentID,
40 'commentUserID' => $likedObject->getComment()->userID,
41 'objectID' => $likedObject->getComment()->objectID
48 protected static function getTestLikeableObjectTypeName() {
49 return 'com.woltlab.wcf.comment.response';