File: tests/Model/ServiceTest.php

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

Contents

Class file image Download
<?php

namespace WsdlToPhp\PackageGenerator\Tests\Model;

use
WsdlToPhp\PackageGenerator\Tests\TestCase;
use
WsdlToPhp\PackageGenerator\Model\Service;

class
ServiceTest extends TestCase
{
   
/**
     * @param sring $name
     * @return Service
     */
   
public static function instance($name)
    {
        return new
Service(self::getBingGeneratorInstance(), $name);
    }
   
/**
     *
     */
   
public function testGetMethod()
    {
       
$service = self::instance('Foo');
       
$service->addMethod('getBar', 'string', 'int');
       
$service->addMethod('getFoo', 'string', 'int');

       
$this->assertInstanceOf('\\WsdlToPhp\\PackageGenerator\\Model\\Method', $service->getMethod('getBar'));
       
$this->assertNotInstanceOf('\\WsdlToPhp\\PackageGenerator\\Model\\Method', $service->getMethod('getbar'));

       
$service->getMethod('getBar')->setName('getbar');
       
$this->assertInstanceOf('\\WsdlToPhp\\PackageGenerator\\Model\\Method', $service->getMethod('getbar'));
    }
}


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