public function test format returns the formatted certificate()
 {
     $dummyChainPem1 = uniqid();
     $dummyChainPem2 = uniqid();
     $dummyCertificate = $this->prophesize(Certificate::class)->reveal();
     $dummyKeyPair = $this->prophesize(KeyPair::class)->reveal();
     $this->mockCertificateAuthorityConfiguration->getCertificatesChain()->willReturn([$dummyChainPem1, $dummyChainPem2]);
     $this->assertSame($dummyChainPem1 . $dummyChainPem2, $this->service->format($dummyCertificate, $dummyKeyPair));
 }
 public function test format returns the formatted certificate()
 {
     $dummyCertificatePem = uniqid();
     $dummyPrivatePem = uniqid();
     $dummyChainPem1 = uniqid();
     $dummyChainPem2 = uniqid();
     $mockCertificate = $this->prophesize(Certificate::class);
     $mockKeyPair = $this->prophesize(KeyPair::class);
     $mockCertificate->getPem()->willReturn($dummyCertificatePem);
     $mockKeyPair->getPrivateKeyAsPEM()->willReturn($dummyPrivatePem);
     $this->mockCertificateAuthorityConfiguration->getCertificatesChain()->willReturn([$dummyChainPem1, $dummyChainPem2]);
     $this->assertSame($dummyCertificatePem . $dummyChainPem1 . $dummyChainPem2 . $dummyPrivatePem, $this->service->format($mockCertificate->reveal(), $mockKeyPair->reveal()));
 }
 /**
  * {@inheritdoc}
  */
 public function format(Certificate $certificate, KeyPair $domainKeyPair)
 {
     return implode('', $this->certificateAuthorityConfiguration->getCertificatesChain());
 }
 /**
  * {@inheritdoc}
  */
 public function format(Certificate $certificate, KeyPair $domainKeyPair)
 {
     return $certificate->getPem() . implode('', $this->certificateAuthorityConfiguration->getCertificatesChain()) . $domainKeyPair->getPrivateKeyAsPEM();
 }