public function test__deserialize_formatted_certificate()
 {
     $context = new DeserializationContext();
     $context->getDocument()->load(__DIR__ . '/../../../../../../resources/sample/EntityDescriptor/ed01-formatted-certificate.xml');
     $ed = new EntityDescriptor();
     $ed->deserialize($context->getDocument()->firstChild, $context);
     $this->assertNotNull($ed->getFirstIdpSsoDescriptor());
     $arr = $ed->getFirstIdpSsoDescriptor()->getAllKeyDescriptors();
     $this->assertCount(1, $arr);
     /** @var KeyDescriptor $kd */
     $kd = array_shift($arr);
     $crt = openssl_x509_parse($kd->getCertificate()->toPem());
     $this->assertEquals('idp.testshib.org', $crt['subject']['CN']);
 }