PHP Classes

File: tests/Container/PhpElement/MethodTest.php

Recommend this page to a friend!
  Classes of WsdlToPhp   PHP SOAP Package Generator   tests/Container/PhpElement/MethodTest.php   Download  
File: tests/Container/PhpElement/MethodTest.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: 8 years ago
Size: 866 bytes
 

Contents

Class file image Download
<?php

namespace WsdlToPhp\PackageGenerator\Tests\Container\PhpElement;

use
WsdlToPhp\PhpGenerator\Element\PhpMethod;
use
WsdlToPhp\PhpGenerator\Element\PhpConstant;
use
WsdlToPhp\PackageGenerator\Container\PhpElement\Method;
use
WsdlToPhp\PackageGenerator\Tests\TestCase;

class
MethodTest extends TestCase
{
   
/**
     *
     */
   
public function testAdd()
    {
       
$method = new Method(self::getBingGeneratorInstance());

       
$method->add(new PhpMethod('foo'));

       
$this->assertCount(1, $method);

       
$this->assertInstanceOf('\\WsdlToPhp\\PhpGenerator\\Element\\PhpMethod', $method->get('foo'));
    }
   
/**
     * @expectedException \InvalidArgumentException
     */
   
public function testAddWithException()
    {
       
$method = new Method(self::getBingGeneratorInstance());

       
$method->add(new PhpConstant('Bar'));
    }
}