~ubuntu-branches/ubuntu/hardy/php5/hardy-updates

« back to all changes in this revision

Viewing changes to ext/soap/tests/bugs/bug28751.phpt

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-10-09 03:14:32 UTC
  • Revision ID: james.westby@ubuntu.com-20051009031432-kspik3lobxstafv9
Tags: upstream-5.0.5
ImportĀ upstreamĀ versionĀ 5.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
--TEST--
 
2
Bug #28751 (SoapServer does not call _autoload())
 
3
--SKIPIF--
 
4
<?php require_once('skipif.inc'); ?>
 
5
--FILE--
 
6
<?php
 
7
function __autoload($className) {
 
8
        class SoapServerActions {
 
9
    function test() {
 
10
      return "Hello World";
 
11
    }
 
12
        }
 
13
}
 
14
 
 
15
$server = new SoapServer(NULL, array('uri'=>"http://testuri.org"));
 
16
$server->setClass("SoapServerActions");
 
17
 
 
18
$HTTP_RAW_POST_DATA = <<<EOF
 
19
<?xml version="1.0" encoding="ISO-8859-1"?>
 
20
<SOAP-ENV:Envelope
 
21
  SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
 
22
  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
 
23
  xmlns:xsd="http://www.w3.org/2001/XMLSchema"
 
24
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 
25
  xmlns:si="http://soapinterop.org/xsd">
 
26
  <SOAP-ENV:Body>
 
27
    <ns1:test xmlns:ns1="http://testuri.org" />
 
28
  </SOAP-ENV:Body>
 
29
</SOAP-ENV:Envelope>
 
30
EOF;
 
31
 
 
32
$server->handle();
 
33
echo "ok\n";
 
34
?>
 
35
--EXPECT--
 
36
<?xml version="1.0" encoding="UTF-8"?>
 
37
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://testuri.org" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:testResponse><return xsi:type="xsd:string">Hello World</return></ns1:testResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
 
38
ok