mirror of
https://github.com/maelgangloff/domain-watchdog.git
synced 2025-12-17 17:55:42 +00:00
test: disable constructor when mocking RDAPService
This commit is contained in:
parent
95c6b9bb55
commit
e3b3881baf
@ -10,9 +10,9 @@ use App\Entity\DomainStatus;
|
|||||||
use App\Exception\MalformedDomainException;
|
use App\Exception\MalformedDomainException;
|
||||||
use App\Service\RDAPService;
|
use App\Service\RDAPService;
|
||||||
use PHPUnit\Framework\Attributes\DataProvider;
|
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
|
public function testIsRedemptionPeriod(): void
|
||||||
{
|
{
|
||||||
@ -234,6 +234,7 @@ final class DomainTest extends TestCase
|
|||||||
bool $expected,
|
bool $expected,
|
||||||
): void {
|
): void {
|
||||||
$rdapServiceMock = $this->getMockBuilder(RDAPService::class)
|
$rdapServiceMock = $this->getMockBuilder(RDAPService::class)
|
||||||
|
->disableOriginalConstructor()
|
||||||
->onlyMethods(['getExpiresInDays'])
|
->onlyMethods(['getExpiresInDays'])
|
||||||
->getMock();
|
->getMock();
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user