2 namespace wcf\system\user\notification\event;
3 use wcf\data\comment\LikeableComment;
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 like user notificiation events.
11 * @author Matthias Schmidt
12 * @copyright 2001-2018 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 TTestableCommentLikeUserNotificationEvent {
18 use TTestableCommentUserNotificationEvent;
19 use TTestableLikeUserNotificationEvent {
20 TTestableLikeUserNotificationEvent::canBeTriggeredByGuests insteadof TTestableCommentUserNotificationEvent;
21 TTestableLikeUserNotificationEvent::getTestObjects insteadof TTestableCommentUserNotificationEvent;
27 protected static function createTestLikeObject(UserProfile $recipient, UserProfile $author) {
28 return new LikeableComment(self::createTestComment($recipient, $author));
34 public static function getTestAdditionalData(IUserNotificationObject $object) {
35 /** @var LikeableComment $likedObject */
36 $likedObject = self::getTestLikeObject($object);
39 'objectID' => $likedObject->objectID,
40 'objectOwnerID' => $likedObject->getUserID()
47 protected static function getTestLikeableObjectTypeName() {
48 return 'com.woltlab.wcf.comment';