public function test_metadata_profile() { $buildContainer = $this->getBuildContainer(); $builder = new \LightSaml\Builder\Profile\Metadata\MetadataProfileBuilder($buildContainer); $context = $builder->buildContext(); $action = $builder->buildAction(); $action->execute($context); $this->assertNotNull($context->getHttpResponseContext()->getResponse()); $xml = $context->getHttpResponseContext()->getResponse()->getContent(); $root = new \SimpleXMLElement($xml); $this->assertEquals('EntityDescriptor', $root->getName()); $this->assertEquals('SPSSODescriptor', $root->SPSSODescriptor->getName()); $this->assertEquals('https://localhost/lightsaml/lightSAML/web/sp/acs.php', $root->SPSSODescriptor->AssertionConsumerService['Location']); }
<?php require_once __DIR__ . '/_config.php'; $builder = new \LightSaml\Builder\Profile\Metadata\MetadataProfileBuilder(IdpConfig::current()->getBuildContainer()); $context = $builder->buildContext(); $action = $builder->buildAction(); //print "<pre>\n"; //print_r($action->debugPrintTree()); // //exit; $action->execute($context); $context->getHttpResponseContext()->getResponse()->send();