isAdminOnly example

$criteria = (new Criteria())->setLimit(1);

        /** @var NotificationCollection $notifications */
        $notifications = $this->notificationRepository->search($criteria$this->context);
        static::assertEquals(1, $notifications->count());

        /** @var NotificationEntity $notification */
        $notification = $notifications->first();
        static::assertEquals($data['status']$notification->getStatus());
        static::assertEquals($data['message']$notification->getMessage());
        static::assertEquals($data['adminOnly']$notification->isAdminOnly());
        static::assertEquals($data['requiredPrivileges']$notification->getRequiredPrivileges());

        if ($integrationId) {
            static::assertEquals($integrationId$notification->getCreatedByIntegrationId());
        }
    }

    /** * @return array<array<array<string>|string|bool>> */
    public static function saveNotificationProvider(): array
    {
Home | Imprint | This part of the site doesn't use cookies.