PHP Classes

File: tests/Client.php

Recommend this page to a friend!
  Classes of WsdlToPhp   Package Base   tests/Client.php   Download  
File: tests/Client.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: Package Base
Base classes for implementing a package generator
Author: By
Last change: issue #32 - migrate to PHP >= 7.4
Date: 3 years ago
Size: 1,490 bytes
 

Contents

Class file image Download
<?php

declare(strict_types=1);

namespace
WsdlToPhp\PackageBase\Tests;

use
SoapClient;

class
Client extends SoapClient
{
    public function
__getLastRequest()
    {
        return
file_get_contents(__DIR__ . '/resources/oneline.xml');
    }

    public function
__getLastResponse()
    {
        return
file_get_contents(__DIR__ . '/resources/oneline.xml');
    }

    public function
__getLastRequestHeaders()
    {
        return
"X-Header-1: valud-1\r\n".
              
"X-Header-2: valud-2\r\n".
              
"X-Header-Date: 2015-03-02T21:36:87\r\n".
              
"X-Header-Content-Type: text/xml; charset=utf-8\r\n";
    }

    public function
getLastRequestHeadersAsArray()
    {
        return [
           
'X-Header-1' => 'valud-1',
           
'X-Header-2' => 'valud-2',
           
'X-Header-Date' => '2015-03-02T21:36:87',
           
'X-Header-Content-Type' => 'text/xml; charset=utf-8',
        ];
    }

    public function
__getLastResponseHeaders()
    {
        return
"X-Header-1: valud-1\r\n".
              
"X-Header-2: valud-2\r\n".
              
"X-Header-Date: 2015-03-02T21:36:87\r\n".
              
"X-Header-Content-Type: text/xml; charset=utf-8\r\n";
    }

    public function
getLastResponseHeadersAsArray()
    {
        return [
           
'X-Header-1' => 'valud-1',
           
'X-Header-2' => 'valud-2',
           
'X-Header-Date' => '2015-03-02T21:36:87',
           
'X-Header-Content-Type' => 'text/xml; charset=utf-8',
        ];
    }
}