26 lines
874 B
PHP
26 lines
874 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Tests\Unit\Services\WorkingDays;
|
|
|
|
use App\Services\WorkingDays\PublicHolidays\Generator\PublicHolidaysCzechGenerator;
|
|
use App\Services\WorkingDays\PublicHolidays\PublicHolidaysGeneratorFactory;
|
|
use Tests\TestCase;
|
|
|
|
class PublicHolidaysGeneratorFactoryTest extends TestCase
|
|
{
|
|
public function testPublicHolidaysGeneratorFactoryWillReturnCzechGeneratorForCZ(): void
|
|
{
|
|
$factory = new PublicHolidaysGeneratorFactory();
|
|
$this->assertInstanceOf(PublicHolidaysCzechGenerator::class, $factory->createPublicHolidaysGeneratorForCountry('CZ'));
|
|
}
|
|
|
|
public function testRuntimeExceptionGeneratedForUnknownState(): void
|
|
{
|
|
$factory = new PublicHolidaysGeneratorFactory();
|
|
$this->expectException(\RuntimeException::class);
|
|
$factory->createPublicHolidaysGeneratorForCountry('XZ');
|
|
}
|
|
}
|