ogsoft-example/tests/Unit/Services/WorkingDays/PublicHolidaysStateFactoryTest.php

25 lines
991 B
PHP

<?php
declare(strict_types=1);
namespace Tests\Unit\Services\WorkingDays;
use App\Services\WorkingDays\PublicHolidays\PublicHolidaysStateDeterminer;
use App\Services\WorkingDays\PublicHolidays\PublicHolidaysStateFactory;
use App\Services\WorkingDays\PublicHolidays\PublicHolidaysStateStorageInterface;
use App\Services\WorkingDays\PublicHolidays\Storage\PublicHolidaysStorageInterface;
use Tests\TestCase;
class PublicHolidaysStateFactoryTest extends TestCase
{
public function testCreateStoreForCountryWillReturnCzechStorageForCZ(): void
{
$storage = $this->createMock(PublicHolidaysStorageInterface::class);
$factory = new PublicHolidaysStateFactory($storage);
$store = $factory->createStoreForCountry('CZ');
$determiner = $factory->createDeterminerForCountry('CZ');
$this->assertInstanceOf(PublicHolidaysStateStorageInterface::class, $store);
$this->assertInstanceOf(PublicHolidaysStateDeterminer::class, $determiner);
}
}