Skip to content

Commit 1bc2400

Browse files
committed
Improve phpdoc & error message
1 parent d33094f commit 1bc2400

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/XML/md/SPSSODescriptor.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,9 @@ public function __construct(
9898
'All md:AttributeConsumingService endpoints must be an instance of AttributeConsumingService.',
9999
);
100100

101-
// test that only one ACS is marked as default
101+
/**
102+
* E87: test that only one ACS is marked as default
103+
*/
102104
Assert::maxCount(
103105
array_filter(
104106
$attributeConsumingService,
@@ -107,7 +109,7 @@ function (AttributeConsumingService $acs) {
107109
},
108110
),
109111
1,
110-
'Only one md:AttributeConsumingService can be set as default.',
112+
'At most one <AttributeConsumingService> element can have the attribute isDefault set to true.',
111113
);
112114
}
113115

tests/SAML2/XML/md/SPSSODescriptorTest.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,9 @@ public function testUnmarshallingTwoDefaultACS(): void
286286
$acs->item(1)->setAttribute('isDefault', 'true');
287287

288288
$this->expectException(AssertionFailedException::class);
289-
$this->expectExceptionMessage('Only one md:AttributeConsumingService can be set as default.');
289+
$this->expectExceptionMessage(
290+
'At most one <AttributeConsumingService> element can have the attribute isDefault set to true.',
291+
);
290292

291293
SPSSODescriptor::fromXML($xmlRepresentation->documentElement);
292294
}

0 commit comments

Comments
 (0)