File: tests/Parser/Wsdl/TagComplexTypeTest.php

Recommend this page to a friend!
  Classes of WsdlToPhp  >  PHP SOAP Package Generator  >  tests/Parser/Wsdl/TagComplexTypeTest.php  >  Download  
File: tests/Parser/Wsdl/TagComplexTypeTest.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: PHP SOAP Package Generator
Generate package to call SOAP services using WSDL
Author: By
Last change:
Date: 5 years ago
Size: 1,793 bytes
 

Contents

Class file image Download
<?php

namespace WsdlToPhp\PackageGenerator\Tests\Parser\Wsdl;

use
WsdlToPhp\PackageGenerator\Parser\Wsdl\TagComplexType;

class
TagComplexTypeTest extends WsdlParser
{
   
/**
     * @return \WsdlToPhp\PackageGenerator\Parser\Wsdl\TagComplexType
     */
   
public static function ebayInstance()
    {
        return new
TagComplexType(self::generatorInstance(self::wsdlEbayPath()));
    }
   
/**
     * @return \WsdlToPhp\PackageGenerator\Parser\Wsdl\TagComplexType
     */
   
public static function partnerInstance()
    {
        return new
TagComplexType(self::generatorInstance(self::wsdlPartnerPath()));
    }
   
/**
     *
     */
   
public function testParseEbay()
    {
       
$tagComplexTypeParser = self::ebayInstance();

       
$tagComplexTypeParser->parse();

       
$ok = false;
       
$structs = $tagComplexTypeParser->getGenerator()->getStructs();
        if (
$structs->count() > 0) {
           
$this->assertTrue($structs->getStructByName('AbstractRequestType')->getIsAbstract());
           
$this->assertTrue($structs->getStructByName('AbstractResponseType')->getIsAbstract());
           
$ok = true;
        }
       
$this->assertTrue((bool)$ok);
    }
   
/**
     *
     */
   
public function testParseOrderContract()
    {
       
$tagComplexTypeParser = self::partnerInstance();

       
$tagComplexTypeParser->parse();

       
$ok = false;
       
$structs = $tagComplexTypeParser->getGenerator()->getStructs();
        if (
$structs->count() > 0) {
           
$this->assertSame('true', $structs->getStructByName('MemberNumber')->getMetaValue('nillable'));
           
$this->assertSame('tns:MemberNumber', $structs->getStructByName('MemberNumber')->getMetaValue('type'));
           
$ok = true;
        }
       
$this->assertTrue((bool)$ok);
    }
}


For more information send a message to info at phpclasses dot org.