Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion interfaces/event/AbstractCalendarQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Exception;
use humhub\modules\calendar\helpers\CalendarUtils;
use humhub\modules\calendar\models\CalendarEntry;
use humhub\modules\calendar\models\CalendarEntryParticipant;
use humhub\modules\content\components\ContentContainerActiveRecord;
use humhub\modules\user\models\User;
use humhub\modules\content\components\ActiveQueryContent;
Expand Down Expand Up @@ -1124,6 +1123,11 @@ public function filterIsParticipant()
throw new FilterNotSupportedException('Participant filter not supported for this query');
}

public function filterOrIsParticipant()
{
throw new FilterNotSupportedException('Participant filter not supported for this query');
}

/**
* Can be used to pre filter the result list
* @param $result
Expand Down
8 changes: 5 additions & 3 deletions tests/codeception/unit/reminder/ReminderProcessTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ class ReminderProcessTest extends CalendarUnitTest
{
protected function setUp(): void
{
parent::setUp();
Yii::$app->installationState->setInstalled();

Yii::$app->getModule('calendar')->set(CalendarService::class, ['class' => CalendarService::class]);
// Make sure we don't receive content created notifications
Membership::updateAll(['send_notifications' => 0]);
Expand Down Expand Up @@ -86,8 +89,7 @@ public function testDisableEntryLevelReminderLevel()
public function testDisableUserEntryLevelReminderLevel()
{
$space = Space::findOne(['id' => 3]);
$this->becomeUser('admin');
$user = User::findOne(['id' => 1]);
$user = $this->becomeUser('admin');

// Entry begins exactly in one hour
$entry = $this->createEntry((new DateTime())->add(new DateInterval('PT1H')), null, 'Test', $space);
Expand All @@ -105,7 +107,7 @@ public function testDisableUserEntryLevelReminderLevel()
$entryLevelReminder = CalendarReminder::initEntryLevel(CalendarReminder::UNIT_HOUR, 2, $entry);
$this->assertTrue($entryLevelReminder->save());

$userEntrylevelReminder = CalendarReminder::initDisableEntryLevelDefaults($entry, User::findOne(['id' => 1]));
$userEntrylevelReminder = CalendarReminder::initDisableEntryLevelDefaults($entry, $user);
$this->assertTrue($userEntrylevelReminder->save());

(new ReminderService())->sendAllReminder();
Expand Down