Remove dependencies on url_shortener raw config

This commit is contained in:
Alejandro Celaya
2024-10-20 12:52:00 +02:00
parent b991b1699e
commit c8e5196aab
26 changed files with 83 additions and 84 deletions

View File

@@ -11,6 +11,7 @@ use PHPUnit\Framework\MockObject\MockObject;
use PHPUnit\Framework\TestCase;
use Shlinkio\Shlink\Core\Config\EmptyNotFoundRedirectConfig;
use Shlinkio\Shlink\Core\Config\NotFoundRedirects;
use Shlinkio\Shlink\Core\Config\Options\UrlShortenerOptions;
use Shlinkio\Shlink\Core\Domain\DomainService;
use Shlinkio\Shlink\Core\Domain\Entity\Domain;
use Shlinkio\Shlink\Core\Domain\Model\DomainItem;
@@ -28,7 +29,10 @@ class DomainServiceTest extends TestCase
protected function setUp(): void
{
$this->em = $this->createMock(EntityManagerInterface::class);
$this->domainService = new DomainService($this->em, 'default.com');
$this->domainService = new DomainService(
$this->em,
new UrlShortenerOptions(domain: ['hostname' => 'default.com']),
);
}
#[Test, DataProvider('provideExcludedDomains')]