<?php

declare(strict_types=1);

/*
 * Chill is a software for social workers
 *
 * For the full copyright and license information, please view
 * the LICENSE file that was distributed with this source code.
 */

namespace Chill\MainBundle\Tests\Notification\Email;

use Chill\MainBundle\Notification\Email\DailyNotificationDigestCronjob;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;

/**
 * Run functional test on the cronjob.
 *
 * @internal
 *
 * @coversNothing
 */
class DailyNotificationDigestCronJobFunctionalTest extends KernelTestCase
{
    private DailyNotificationDigestCronjob $dailyNotificationDigestCronjob;

    protected function setUp(): void
    {
        self::bootKernel();

        $this->dailyNotificationDigestCronjob = self::getContainer()->get(DailyNotificationDigestCronjob::class);
    }

    public function testRunWithNullPreviousExecutionData(): void
    {
        $actual = $this->dailyNotificationDigestCronjob->run([]);

        self::assertArrayHasKey('last_execution', $actual);
    }
}
