📁
SKYSHELL MANAGER
PHP v8.2.31
Create
Create
Path:
root
/
home
/
thevaxnx
/
nativize.com
/
staging
/
wp-includes
/
js
/
tinymce
/
themes
/
Name
Size
Perm
Actions
📁
inlite
-
0755
🗑️
🏷️
🔒
📁
modern
-
0755
🗑️
🏷️
🔒
📄
wp-links-opml.php
6.83 KB
0444
🗑️
🏷️
⬇️
✏️
🔒
Edit: ActivateTest.php
<?php namespace App\Tests\Unit\Service\Certificate; use App\Entity\Certificate as CertificateEntity; use App\Service\Certificate\Activate; use App\Service\Certificate\Certificate; use App\Service\Certificate\CertificateTransfer; use App\Service\Certificate\ProductManager; use App\Service\CpanelHelper; use App\Service\NcGatewayApi\NcGatewayApi; use Doctrine\ORM\EntityManagerInterface; use PHPUnit\Framework\MockObject\MockObject; use PHPUnit\Framework\TestCase; use Psr\Log\LoggerInterface; use ReflectionMethod; class ActivateTest extends TestCase { public function testMakeExternalCallDelegatesTypeReplacementToCertificateService(): void { $transfer = new CertificateTransfer([ 'domainName' => 'example.com', 'certificateType' => 'positivessl', ]); /** @var NcGatewayApi&MockObject $ncGatewayApi */ $ncGatewayApi = $this->createMock(NcGatewayApi::class); $ncGatewayApi->method('activate')->willReturn([]); /** @var Certificate&MockObject $certificate */ $certificate = $this->createMock(Certificate::class); $certificate->expects(self::once()) ->method('handleCertificateTypeReplacement') ->with(self::identicalTo($transfer)); $activate = new Activate( $this->createMock(CpanelHelper::class), $ncGatewayApi, $this->createMock(EntityManagerInterface::class), $this->createMock(LoggerInterface::class), $this->createMock(ProductManager::class), $certificate, ); (new ReflectionMethod(Activate::class, 'makeExternalCall')) ->invoke($activate, $transfer, 'csr', false); self::assertSame(CertificateEntity::NCSTATUS_ORDERCREATED, $transfer->getNCStatus()); } }
Save