public function test_logs_known_issuer()
 {
     $action = new KnownAssertionIssuerAction($loggerMock = TestHelper::getLoggerMock($this), $entityDescriptorStoreMock = TestHelper::getEntityDescriptorStoreMock($this));
     $context = TestHelper::getAssertionContext($assertion = new Assertion());
     $assertion->setIssuer(new Issuer($issuer = 'http://issuer.com'));
     $entityDescriptorStoreMock->expects($this->once())->method('has')->with($issuer)->willReturn(true);
     $loggerMock->expects($this->once())->method('debug')->with('Known assertion issuer: "http://issuer.com"');
     $action->execute($context);
 }
 public function test_all_returns_union_of_all_children_results()
 {
     $composite = new CompositeEntityDescriptorStore([$child1 = TestHelper::getEntityDescriptorStoreMock($this), $child2 = TestHelper::getEntityDescriptorStoreMock($this), $child3 = TestHelper::getEntityDescriptorStoreMock($this)]);
     $child1->expects($this->once())->method('all')->willReturn([$ed1 = new EntityDescriptor()]);
     $child2->expects($this->once())->method('all')->willReturn([$ed2 = new EntityDescriptor(), $ed3 = new EntityDescriptor()]);
     $child3->expects($this->once())->method('all')->willReturn([]);
     $all = $composite->all();
     $this->assertCount(3, $all);
     $this->assertSame($ed1, $all[0]);
     $this->assertSame($ed2, $all[1]);
     $this->assertSame($ed3, $all[2]);
 }