22 lines
739 B
PHP
22 lines
739 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Unit\IslamicSundaySchool;
|
|
|
|
use App\Domain\IslamicSundaySchool\Attendance\IslamicSundaySchoolAttendancePolicy;
|
|
use App\Domain\SchoolCore\Context\SchoolContext;
|
|
use PHPUnit\Framework\TestCase;
|
|
|
|
final class AttendancePolicyTest extends TestCase
|
|
{
|
|
public function test_it_treats_sunday_as_school_day(): void
|
|
{
|
|
$context = new SchoolContext(1, 2, [], '2025', 'spring', 'UTC', 'en', 'USD', 'islamic_sunday_school');
|
|
$policy = new IslamicSundaySchoolAttendancePolicy();
|
|
|
|
$this->assertTrue($policy->isSchoolDay($context, new \DateTimeImmutable('2026-05-31')));
|
|
$this->assertFalse($policy->isSchoolDay($context, new \DateTimeImmutable('2026-05-30')));
|
|
}
|
|
}
|