File: tests/Container/Model/MethodContainerTest.php

Recommend this page to a friend!
  Classes of WsdlToPhp  >  PHP SOAP Package Generator  >  tests/Container/Model/MethodContainerTest.php  >  Download  
File: tests/Container/Model/MethodContainerTest.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,318 bytes
 

Contents

Class file image Download
<?php

namespace WsdlToPhp\PackageGenerator\Tests\Container\Model;

use
WsdlToPhp\PackageGenerator\Tests\Model\ServiceTest;
use
WsdlToPhp\PackageGenerator\Model\Method;
use
WsdlToPhp\PackageGenerator\Container\Model\Method as MethodContainer;
use
WsdlToPhp\PackageGenerator\Tests\TestCase;

class
MethodContainerTest extends TestCase
{
   
/**
     * @return MethodContainer
     */
   
public static function instance()
    {
       
$service = ServiceTest::instance('Bar');
       
$methodContainer = new MethodContainer(self::getBingGeneratorInstance());
       
$methodContainer->add(new Method(self::getBingGeneratorInstance(), 'Foo', 'string', 'int', $service));
       
$methodContainer->add(new Method(self::getBingGeneratorInstance(), 'Bar', 'string', 'int', $service));
       
$methodContainer->add(new Method(self::getBingGeneratorInstance(), 'FooBar', array(
           
'string',
           
'int',
           
'int',
        ),
'int', $service));
        return
$methodContainer;
    }
   
/**
     *
     */
   
public function testGetMethodByName()
    {
       
$methodContainer = self::instance();

       
$this->assertInstanceOf('\\WsdlToPhp\\PackageGenerator\\Model\\Method', $methodContainer->getMethodByName('Foo'));
       
$this->assertNull($methodContainer->getMethodByName('boo'));
    }
}


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