PHP Classes

File: tests/File/ClassMapTest.php

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

Contents

Class file image Download
<?php

namespace WsdlToPhp\PackageGenerator\Tests\File;

use
WsdlToPhp\PackageGenerator\Model\EmptyModel;
use
WsdlToPhp\PackageGenerator\File\ClassMap as ClassMapFile;
use
WsdlToPhp\PackageGenerator\Tests\File\AbstractFile;

class
ClassMapTest extends AbstractFile
{
   
/**
     *
     */
   
public function testBing()
    {
       
$instance = self::bingGeneratorInstance();

       
$model = new EmptyModel($instance, 'ClassMap');
       
$classMap = new ClassMapFile($instance, $model->getPackagedName());
       
$classMap
           
->setModel($model)
            ->
write();

       
$this->assertSameFileContent('ValidBingClassMap', $classMap);
    }
   
/**
     *
     */
   
public function testReforma()
    {
       
$instance = self::reformaGeneratorInstance();

       
$model = new EmptyModel($instance, 'ClassMap');
       
$classMap = new ClassMapFile($instance, $model->getPackagedName());
       
$classMap
           
->setModel($model)
            ->
write();

       
$this->assertSameFileContent('ValidReformaClassMap', $classMap);
    }
   
/**
     *
     */
   
public function testActon()
    {
       
$instance = self::actonGeneratorInstance();

       
$model = new EmptyModel($instance, 'ClassMap');
       
$classMap = new ClassMapFile($instance, $model->getPackagedName());
       
$classMap
           
->setModel($model)
            ->
write();

       
$this->assertSameFileContent('ValidActonClassMap', $classMap);
    }
   
/**
     *
     */
   
public function testDestination()
    {
       
$instance = self::bingGeneratorInstance();

       
$model = new EmptyModel($instance, 'ClassMap');
       
$classMap = new ClassMapFile($instance, $model->getPackagedName());
       
$classMap->setModel($model);

       
$this->assertSame(sprintf('%s%s', self::getTestDirectory(), ClassMapFile::SRC_FOLDER), $classMap->getFileDestination());
    }
}