public function test createAcmeClient use CA configuration() { $keyPair = $this->prophesize(KeyPair::class)->reveal(); $this->mockCA->getBaseUri()->shouldBeCalled(); $this->mockCA->getAgreement()->shouldBeCalled(); $client = $this->service->createAcmeClient($keyPair); $this->assertInstanceOf(AcmeClient::class, $client); }
/** * Create a new instance of AcmeClient for the given account KeyPair. * * @param KeyPair $keyPair * * @return AcmeClient */ public function createAcmeClient(KeyPair $keyPair) { return new AcmeClient($this->certificateAuthority->getBaseUri(), $this->certificateAuthority->getAgreement(), $keyPair, $this->logger); }