/**
  * @test
  * @group metadata
  */
 public function a_scope_can_be_cast_to_a_known_format_string()
 {
     $scope = ShibbolethMetadataScope::literal('foo');
     $this->assertEquals('ShibbolethMetadataScope(scope=foo, regexp=false)', (string) $scope);
 }
 public static function deserialize($data)
 {
     Assertion::isArray($data);
     $scopes = array_map(function ($scope) {
         return ShibbolethMetadataScope::deserialize($scope);
     }, $data);
     return new self($scopes);
 }
 /**
  * @test
  * @group metadata
  */
 public function a_list_can_be_cast_to_string()
 {
     $literal = ShibbolethMetadataScope::literal('foo');
     $regexp = ShibbolethMetadataScope::regexp('/a{3,4}/i');
     $list = new ShibbolethMetadataScopeList(array($literal, $regexp));
     $this->assertStringStartsWith('ShibbolethMetadataScopeList', (string) $list);
 }