示例#1
0
 public function testUpdatingCreatesRevision()
 {
     $connection = new Connection('a', 'saml20-idp');
     $configMock = new ConfigProxy(array(), 'a');
     $connection->update(new MetadataDefinitionHelper($configMock), 'a', 'saml20-idp', null, 'testNote', 'test', new \DateTime(), 'testurl', true, array(), null, true);
     $this->assertInstanceOf('Janus\\ServiceRegistry\\Entity\\Connection\\Revision', $connection->getLatestRevision());
 }
示例#2
0
$em->flush();
$userSubscription = new User\Subscription($subscribingUser, 'testSubscription', 'testType');
$em->persist($userSubscription);
$em->flush();
$em->remove($userSubscription);
$em->flush();
$em->remove($subscribingUser);
$em->flush();
$connection = new Connection('test-idp' . time(), 'saml20-idp');
$connection->update($connection->getName(), $connection->getType(), null, 'initial', 'testaccepted', new \DateTime(), 'http://test', true, array('foo'), null, true, null);
$connectionRevision = $connection->getLatestRevision();
$em->persist($connection);
$em->flush();
$remoteConnection = new Connection('test-sp' . time(), 'saml20-sp');
$remoteConnection->update($remoteConnection->getName(), $remoteConnection->getType(), null, 'initial', 'test', new \DateTime(), 'http://test', true, null, null, true, null);
$remoteConnectionRevision = $remoteConnection->getLatestRevision();
$em->persist($remoteConnection);
$em->flush();
$connectionAllowedConnectionRelation = new Connection\Revision\AllowedConnectionRelation($connectionRevision, $remoteConnection);
$em->persist($connectionAllowedConnectionRelation);
$em->flush();
$em->remove($connectionAllowedConnectionRelation);
$em->flush();
$connectionBlockedConnectionRelation = new Connection\Revision\BlockedConnectionRelation($connectionRevision, $remoteConnection);
$em->persist($connectionBlockedConnectionRelation);
$em->flush();
$em->remove($connectionBlockedConnectionRelation);
$em->flush();
$connectionDisableConsentRelation = new Connection\Revision\DisableConsentRelation($connectionRevision, $remoteConnection);
$em->persist($connectionDisableConsentRelation);
$em->flush();