public function loadDomainDistinguishedName($domain) { try { $json = $this->master->read('private/' . $domain . '/distinguished_name.json'); return $this->serializer->deserialize($json, DistinguishedName::class, JsonEncoder::FORMAT); } catch (\Exception $e) { throw new AcmeCliException(sprintf('Loading of domain %s distinguished name failed', $domain), $e); } }
/** * @expectedException \AcmePhp\Cli\Exception\AcmeCliException */ public function testLoadDomainDistinguishedNameFail() { $this->repository->loadDomainDistinguishedName('example.com'); }