2 declare(strict_types=1);
3 namespace wcf\system\user\notification\event;
4 use wcf\data\comment\LikeableComment;
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 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 TTestableCommentLikeUserNotificationEvent {
19 use TTestableCommentUserNotificationEvent;
20 use TTestableLikeUserNotificationEvent {
21 TTestableLikeUserNotificationEvent::canBeTriggeredByGuests insteadof TTestableCommentUserNotificationEvent;
22 TTestableLikeUserNotificationEvent::getTestObjects insteadof TTestableCommentUserNotificationEvent;
28 protected static function createTestLikeObject(UserProfile $recipient, UserProfile $author) {
29 return new LikeableComment(self::createTestComment($recipient, $author));
35 public static function getTestAdditionalData(IUserNotificationObject $object) {
36 /** @var LikeableComment $likedObject */
37 $likedObject = self::getTestLikeObject($object);
40 'objectID' => $likedObject->objectID,
41 'objectOwnerID' => $likedObject->getUserID()
48 protected static function getTestLikeableObjectTypeName() {
49 return 'com.woltlab.wcf.comment';