Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Dec 13, 2019
1 parent 72f562a commit 5d359c5
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions tests/SAML2/AssertionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,11 +195,21 @@ public function testMarshallingUnmarshallingAttributeValTypes(): void

$assertion->setAuthenticatingAuthority(["idp1", "idp2"]);

$assertion->setAttributes([
"name1" => ["value1",123,"2017-31-12"],
"name2" => [2],
"name3" => [1234, "+2345"]
]);
$attr1 = new Attribute();
$attr1->setName("name1");
$attr1->addAttributeValue(new AttributeValue("value1"));
$attr1->addAttributeValue(new AttributeValue(123));
$attr1->addAttributeValue(new AttributeValue("2017-31-12"));

$attr2 = new Attribute("name2");
$attr2->setName("name2");
$attr2->addAttributeValue(new AttributeValue(2));

$attr3 = new Attribute("name3");
$attr3->setName("name3");
$attr3->addAttributeValue(new AttributeValue(1234));
$attr3->addAttributeValue(new AttributeValue("+2345"));

$assertion->setAttributeNameFormat(\SAML2\Constants::NAMEFORMAT_UNSPECIFIED);

// set xs:type for first and third name1 values, and all name3 values.
Expand Down

0 comments on commit 5d359c5

Please sign in to comment.