File: tests/Parser/Wsdl/TagUnionTest.php

Recommend this page to a friend!
  Classes of WsdlToPhp  >  PHP SOAP Package Generator  >  tests/Parser/Wsdl/TagUnionTest.php  >  Download  
File: tests/Parser/Wsdl/TagUnionTest.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,266 bytes
 

Contents

Class file image Download
<?php

namespace WsdlToPhp\PackageGenerator\Tests\Parser\Wsdl;

use
WsdlToPhp\PackageGenerator\Parser\Wsdl\TagUnion;

class
TagUnionTest extends WsdlParser
{
   
/**
     * @return \WsdlToPhp\PackageGenerator\Parser\Wsdl\TagUnion
     */
   
public static function orderContractInstance()
    {
        return new
TagUnion(self::generatorInstance(self::wsdlOrderContractPath()));
    }
   
/**
     *
     */
   
public function testParseOrderContract()
    {
       
$tagUnionParser = self::orderContractInstance();

       
$tagUnionParser->parse();

       
$count = 0;
       
$structs = $tagUnionParser->getGenerator()->getStructs();
        if (
$structs->count() > 0) {
            foreach (
$structs as $struct) {
                switch (
$struct->getName()) {
                    case
'RelationshipTypeOpenEnum':
                       
$this->assertSame('RelationshipType', $struct->getInheritance());
                       
$count++;
                        break;
                    case
'FaultCodesOpenEnumType':
                       
$this->assertSame('FaultCodesType', $struct->getInheritance());
                       
$count++;
                        break;
                }
            }
        }
       
$this->assertSame(2, $count);
    }
}


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