173 lines
6.3 KiB
PHP
173 lines
6.3 KiB
PHP
<?php
|
|
require_once PATH_TRUNK . 'gulliver/thirdparty/smarty/libs/Smarty.class.php';
|
|
require_once PATH_TRUNK . 'gulliver/system/class.xmlform.php';
|
|
require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php';
|
|
require_once PATH_TRUNK . 'gulliver/system/class.form.php';
|
|
require_once PATH_TRUNK . 'gulliver/system/class.dbconnection.php';
|
|
require_once PATH_TRUNK . 'gulliver/thirdparty/propel/Propel.php';
|
|
require_once PATH_TRUNK . 'gulliver/thirdparty/creole/Creole.php';
|
|
require_once PATH_TRUNK . 'gulliver/thirdparty/pear/PEAR.php';
|
|
require_once PATH_TRUNK . 'gulliver/system/class.httpProxyController.php';
|
|
|
|
/**
|
|
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
|
*/
|
|
|
|
class classHttpProxyControllerTest extends PHPUnit_Framework_TestCase
|
|
{
|
|
/**
|
|
* @var HttpProxyController
|
|
*/
|
|
protected $object;
|
|
|
|
/**
|
|
* Sets up the fixture, for example, opens a network connection.
|
|
* This method is called before a test is executed.
|
|
*/
|
|
protected function setUp()
|
|
{
|
|
$this->object = new HttpProxyController();
|
|
}
|
|
|
|
/**
|
|
* Tears down the fixture, for example, closes a network connection.
|
|
* This method is called after a test is executed.
|
|
*/
|
|
protected function tearDown()
|
|
{
|
|
}
|
|
|
|
/**
|
|
* This is the default method to test, if the class still having
|
|
* the same number of methods.
|
|
*/
|
|
public function testNumberOfMethodsInThisClass()
|
|
{
|
|
$methods = get_class_methods('HttpProxyController'); $this->assertTrue( count($methods) == 8);
|
|
}
|
|
|
|
/**
|
|
* @covers HttpProxyController::__set
|
|
* @todo Implement test__set().
|
|
*/
|
|
public function test__set()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('__set', $methods ), 'exists method __set' );
|
|
$r = new ReflectionMethod('HttpProxyController', '__set');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'name');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'value');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers HttpProxyController::__get
|
|
* @todo Implement test__get().
|
|
*/
|
|
public function test__get()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('__get', $methods ), 'exists method __get' );
|
|
$r = new ReflectionMethod('HttpProxyController', '__get');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'name');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers HttpProxyController::__isset
|
|
* @todo Implement test__isset().
|
|
*/
|
|
public function test__isset()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('__isset', $methods ), 'exists method __isset' );
|
|
$r = new ReflectionMethod('HttpProxyController', '__isset');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'name');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers HttpProxyController::__unset
|
|
* @todo Implement test__unset().
|
|
*/
|
|
public function test__unset()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('__unset', $methods ), 'exists method __unset' );
|
|
$r = new ReflectionMethod('HttpProxyController', '__unset');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'name');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers HttpProxyController::call
|
|
* @todo Implement testcall().
|
|
*/
|
|
public function testcall()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('call', $methods ), 'exists method call' );
|
|
$r = new ReflectionMethod('HttpProxyController', 'call');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'name');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers HttpProxyController::setHttpRequestData
|
|
* @todo Implement testsetHttpRequestData().
|
|
*/
|
|
public function testsetHttpRequestData()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('setHttpRequestData', $methods ), 'exists method setHttpRequestData' );
|
|
$r = new ReflectionMethod('HttpProxyController', 'setHttpRequestData');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'data');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers HttpProxyController::setJsonResponse
|
|
* @todo Implement testsetJsonResponse().
|
|
*/
|
|
public function testsetJsonResponse()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('setJsonResponse', $methods ), 'exists method setJsonResponse' );
|
|
$r = new ReflectionMethod('HttpProxyController', 'setJsonResponse');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'bool');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers HttpProxyController::setSendResponse
|
|
* @todo Implement testsetSendResponse().
|
|
*/
|
|
public function testsetSendResponse()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('setSendResponse', $methods ), 'exists method setSendResponse' );
|
|
$r = new ReflectionMethod('HttpProxyController', 'setSendResponse');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'val');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
}
|