PHP Classes

File: tests/Container/PhpElement/PropertyTest.php

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

Contents

Class file image Download
<?php

namespace WsdlToPhp\PackageGenerator\Tests\Container\PhpElement;

use
WsdlToPhp\PhpGenerator\Element\PhpConstant;
use
WsdlToPhp\PhpGenerator\Element\PhpProperty;
use
WsdlToPhp\PackageGenerator\Container\PhpElement\Property;
use
WsdlToPhp\PackageGenerator\Tests\TestCase;

class
PropertyTest extends TestCase
{
   
/**
     *
     */
   
public function testAdd()
    {
       
$property = new Property(self::getBingGeneratorInstance());

       
$property->add(new PhpProperty('foo'));

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

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

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