PHP Classes

File: tests/Container/PhpElement/ConstantTest.php

Recommend this page to a friend!
  Classes of WsdlToPhp   PHP SOAP Package Generator   tests/Container/PhpElement/ConstantTest.php   Download  
File: tests/Container/PhpElement/ConstantTest.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: 891 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\Constant;
use
WsdlToPhp\PackageGenerator\Tests\TestCase;

class
ConstantTest extends TestCase
{
   
/**
     *
     */
   
public function testAdd()
    {
       
$constant = new Constant(self::getBingGeneratorInstance());

       
$constant->add(new PhpConstant('foo', 1));

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

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

       
$constant->add(new PhpMethod('Bar'));
    }
}