test: disable constructor when mocking RDAPService

This commit is contained in:
Maël Gangloff 2025-10-22 16:14:02 +02:00
parent 95c6b9bb55
commit e3b3881baf
No known key found for this signature in database
GPG Key ID: 11FDC81C24A7F629

View File

@ -10,9 +10,9 @@ use App\Entity\DomainStatus;
use App\Exception\MalformedDomainException;
use App\Service\RDAPService;
use PHPUnit\Framework\Attributes\DataProvider;
use PHPUnit\Framework\TestCase;
use Symfony\Bundle\FrameworkBundle\Test\KernelTestCase;
final class DomainTest extends TestCase
final class DomainTest extends KernelTestCase
{
public function testIsRedemptionPeriod(): void
{
@ -234,6 +234,7 @@ final class DomainTest extends TestCase
bool $expected,
): void {
$rdapServiceMock = $this->getMockBuilder(RDAPService::class)
->disableOriginalConstructor()
->onlyMethods(['getExpiresInDays'])
->getMock();