/** * @expectedException \LightSaml\Error\LightSamlBuildException * @expectedExceptionMessage Profile role not set */ public function test_build_throws_exception_when_profile_role_not_set() { $builder = new ProfileContextBuilder(); $builder->setRequest(new Request()); $builder->setOwnEntityDescriptorProvider(new FixedEntityDescriptorProvider(new EntityDescriptor())); $builder->setProfileId(Profiles::METADATA); $builder->build(); }
/** * @return \LightSaml\Context\Profile\ProfileContext */ public function buildContext() { $builder = new ProfileContextBuilder(); $builder->setProfileId($this->getProfileId())->setRequest($this->container->getSystemContainer()->getRequest())->setProfileRole($this->getProfileRole())->setOwnEntityDescriptorProvider($this->container->getOwnContainer()->getOwnEntityDescriptorProvider()); return $builder->build(); }