Skip to content

Commit

Permalink
Merge branch 'release/1.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
mikaelcom committed Jul 13, 2021
2 parents 3c6591b + 221a62a commit a1f77d3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# CHANGELOG

## 1.0.4 - 2021/07/14
- issue #3 - Choice tag must ignore sequence tag

## 1.0.3 - 2021/05/13
- issue #2 - getAttributeMessageNamespace() must be of the type string, null returned

Expand Down
1 change: 1 addition & 0 deletions src/Tag/TagChoice.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ public static function getForbiddenParentTags(): array
{
return [
AbstractDocument::TAG_COMPLEX_TYPE,
AbstractDocument::TAG_SEQUENCE,
];
}

Expand Down
15 changes: 5 additions & 10 deletions tests/Tag/TagChoiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public function testGetForbiddenParentTagsMustReturnTheListOfForbiddenParentTags
{
$this->assertSame([
'complexType',
'sequence',
], TagChoice::getForbiddenParentTags());
}

Expand Down Expand Up @@ -187,11 +188,8 @@ public function testGetChildrenElementsMustReturnFirstLevelNestedChildrenTagsOfH

$children = $choice->getChildrenElements();

$this->assertCount(4, $children);
$this->assertSame('Success', $children[0]->getAttributeName());
$this->assertSame('Warnings', $children[1]->getAttributeName());
$this->assertSame('HotelDescriptiveContents', $children[2]->getAttributeName());
$this->assertSame('Errors', $children[3]->getAttributeName());
$this->assertCount(1, $children);
$this->assertSame('Errors', $children[0]->getAttributeName());
}

/**
Expand Down Expand Up @@ -263,11 +261,8 @@ public function testGetChildrenElementsMustReturnFirstLevelNestedChildrenTagsOfH

$children = $choice->getChildrenElements();

$this->assertCount(4, $children);
$this->assertSame('Success', $children[0]->getAttributeName());
$this->assertSame('Warnings', $children[1]->getAttributeName());
$this->assertSame('RoomStays', $children[2]->getAttributeName());
$this->assertSame('Errors', $children[3]->getAttributeName());
$this->assertCount(1, $children);
$this->assertSame('Errors', $children[0]->getAttributeName());
}

/**
Expand Down

0 comments on commit a1f77d3

Please sign in to comment.