xref: /PHP-8.3/ext/soap/tests/schema/schema068.phpt (revision 7f2f0c00)
1--TEST--
2SOAP XML Schema 68: Attribute with fixed value (3)
3--EXTENSIONS--
4soap
5xml
6--FILE--
7<?php
8include "test_schema.inc";
9$schema = <<<EOF
10    <complexType name="testType">
11        <attribute name="str" type="string"/>
12        <attribute name="int" type="int" fixed="5"/>
13    </complexType>
14EOF;
15test_schema($schema,'type="tns:testType"',(object)array("str"=>"str","int"=>4));
16echo "ok";
17?>
18--EXPECTF--
19Fatal error: SOAP-ERROR: Encoding: Attribute 'int' has fixed value '5' (value '4' is not allowed) in %stest_schema.inc on line %d
20