Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
veewee committed Aug 25, 2023
1 parent 60b85cb commit c6450db
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 24 deletions.
2 changes: 1 addition & 1 deletion tests/PhpCompatibility/schema1001.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
SOAP XML Schema 18: union with list
SOAP XML Schema 1001: Enums
--FILE--
<?php
include __DIR__."/test_schema.inc";
Expand Down
26 changes: 4 additions & 22 deletions tests/PhpCompatibility/schema1002.phpt
Original file line number Diff line number Diff line change
@@ -1,37 +1,19 @@
--TEST--
SOAP XML Schema 18: union with list
SOAP XML Schema 1002: nested complex types
--FILE--
<?php
include __DIR__."/test_schema.inc";
$schema = <<<EOF
<complexType name="VoluntaryChangesType">
<annotation>
<documentation xml:lang="en">Specifies charges and/or penalties associated with making ticket changes after purchase.</documentation>
</annotation>
<sequence minOccurs="0">
<element name="Penalty" minOccurs="0">
<annotation>
<documentation xml:lang="en">Specifies penalty charges as either a currency amount or a percentage of the fare</documentation>
</annotation>
<complexType>
<attribute name="PenaltyType" type="string" use="optional">
<annotation>
<documentation xml:lang="en">Indicates the type of penalty involved in the search or response.</documentation>
</annotation>
</attribute>
<attribute name="DepartureStatus" type="string" use="optional">
<annotation>
<documentation xml:lang="en">Identifier used to indicate whether the change occurs before or after departure from the origin city.</documentation>
</annotation>
</attribute>
<attribute name="PenaltyType" type="string" use="optional"/>
<attribute name="DepartureStatus" type="string" use="optional"/>
</complexType>
</element>
</sequence>
<attribute name="VolChangeInd" type="boolean" use="optional">
<annotation>
<documentation xml:lang="en">Indicator used to specify whether voluntary change and other penalties are involved in the search or response.</documentation>
</annotation>
</attribute>
<attribute name="VolChangeInd" type="boolean" use="optional"/>
</complexType>
EOF;
test_schema($schema,'type="tns:VoluntaryChangesType"');
Expand Down
2 changes: 1 addition & 1 deletion tests/PhpCompatibility/schema1003.phpt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--TEST--
SOAP XML Schema 18: union with list
SOAP XML Schema 1002: nested elements within complex types
--FILE--
<?php
include __DIR__."/test_schema.inc";
Expand Down
41 changes: 41 additions & 0 deletions tests/PhpCompatibility/schema1004.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
--TEST--
SOAP XML Schema 1004: Nested simple types
--FILE--
<?php
include __DIR__."/test_schema.inc";
$schema = <<<EOF
<simpleType name="StringLength1to128">
<restriction base="string">
<minLength value="1"/>
<maxLength value="128"/>
</restriction>
</simpleType>
<complexType name="EmailType">
<simpleContent>
<extension base="tns:StringLength1to128">
<attribute name="EmailType" type="string" use="optional" />
</extension>
</simpleContent>
</complexType>
<complexType name="VerificationType">
<sequence>
<element name="Email" type="tns:EmailType" minOccurs="0">
</element>
</sequence>
</complexType>
EOF;
test_schema($schema,'type="tns:SpecialEquipPrefs"');
?>
--EXPECT--
Methods:
> test(SpecialEquipPrefs $testParam): void

Types:
> http://test-uri/:StringLength1to128 extends string
> http://test-uri/:EmailType extends StringLength1to128 {
StringLength1to128 $_
@string $EmailType
}
> http://test-uri/:VerificationType {
?EmailType $Email
}

0 comments on commit c6450db

Please sign in to comment.