PHP Classes

File: test/ssa/runner/resolver/impl/FilePrimitiveResolver.php

Recommend this page to a friend!
  Classes of thomas   SSA   test/ssa/runner/resolver/impl/FilePrimitiveResolver.php   Download  
File: test/ssa/runner/resolver/impl/FilePrimitiveResolver.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: SSA
Call PHP classes from JavaScript on Web pages
Author: By
Last change:
Date: 9 years ago
Size: 1,005 bytes
 

Contents

Class file image Download
<?php

namespace ssa\runner\resolver\impl;

use
ssa\runner\resolver\impl\FilePrimitiveResolver;
/**
 * Description of FilePrimitiveResolver
 *
 * @author thomas
 */
class FilePrimitiveResolverTest extends \PHPUnit_Framework_TestCase {
    private
$primitiveResolver;

    public function
setUp() {
       
$this->primitiveResolver = new FilePrimitiveResolver();
    }


    public function
testResolvePrimitiveSimpleArray() {
       
$type = array('file');
       
$param = array(
           
'error' => array(0,1),
           
'tmp_name' => array('2','3'),
           
'size' => array(4,5),
           
'name' => array('6', '7'),
           
'type' => array('8', '9')
        );
       
$return = $this->primitiveResolver->resolvePrimitive($param, $type);
       
$this->assertEquals(array(
               
'error' => 0,
               
'tmp_name' => '2',
               
'size' => 4,
               
'name' => '6',
               
'type' => '8'
           
),
           
$return
       
);
    }
}