PHP Classes

File: ANYEM_CLIENT/anyem.client.tst/ClientIncrementationTest.php

Recommend this page to a friend!
  Classes of Anis Halayem  >  Anyem  >  ANYEM_CLIENT/anyem.client.tst/ClientIncrementationTest.php  >  Download  
File: ANYEM_CLIENT/anyem.client.tst/ClientIncrementationTest.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: Anyem
Exchange variable values between PHP servers
Author: By
Last change:
Date: 4 years ago
Size: 1,335 bytes
 

Contents

Class file image Download
<?php

set_time_limit
(0) ;
ini_set ('memory_limit', '256M');

require_once (
__DIR__ . '/../../ANYEM_SHARED/' . '/anyem.resource.impl/ResourceIdentifierImpl.php');
require_once (
__DIR__ . '/../../ANYEM_SHARED/' . '/anyem.resource.impl/ResourceImpl.php');
require_once (
__DIR__ . '/../../ANYEM_SHARED/' . 'anyem.resource.impl/ResponseWrapperImpl.php') ;

require_once (
__DIR__ . '/../anyem.client.impl/ClientImpl.php');
require_once (
__DIR__ . '/../anyem.client.impl/ClientConnectionImpl.php');


class
ClientIncrementationTest {
    public static function
main ($args) {
       
$clientConnection = ClientConnectionImpl::newClient();
       
$identifier = new ResourceIdentifierImpl("anyem.com", "anyemNameSpace", "a");
       
$client = new ClientImpl($clientConnection, $identifier);
       
        for (
$i=0 ; $i < $args[0] ; $i++) {
           
$a = 0;
           
/**
             * @var ResponseWrapperImpl
             */
           
$responseWrapper = $client->get($a);
           
$a = $responseWrapper->getResource()->getData();
           
$client->put(++$a);
        }
       
        print (
"THESE DATA ARE PROVIDED FROM ANYEM SERVER\n");
       
printf("after %s repetition, [a] variable contains : %s", $args[0], $a) ;
    }
}
ClientIncrementationTest::main(array(1));











For more information send a message to info at phpclasses dot org.