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