2012-07-12 20:40:06 -04:00
|
|
|
<?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.restClient.php';
|
|
|
|
|
|
|
|
|
|
/**
|
2012-07-12 22:34:02 -04:00
|
|
|
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
2012-07-12 20:40:06 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
class classRestClientTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
{
|
2012-05-10 20:51:34 -04:00
|
|
|
/**
|
2012-07-12 20:40:06 -04:00
|
|
|
* @var RestClient
|
2012-05-10 20:51:34 -04:00
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
protected $object;
|
2012-05-10 20:51:34 -04:00
|
|
|
|
|
|
|
|
/**
|
2012-07-12 20:40:06 -04:00
|
|
|
* Sets up the fixture, for example, opens a network connection.
|
|
|
|
|
* This method is called before a test is executed.
|
2012-05-10 20:51:34 -04:00
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
protected function setUp()
|
|
|
|
|
{
|
|
|
|
|
$this->object = new RestClient();
|
|
|
|
|
}
|
2012-05-10 20:51:34 -04:00
|
|
|
|
|
|
|
|
/**
|
2012-07-12 20:40:06 -04:00
|
|
|
* Tears down the fixture, for example, closes a network connection.
|
|
|
|
|
* This method is called after a test is executed.
|
2012-05-10 20:51:34 -04:00
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
protected function tearDown()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* This is the default method to test, if the class still having
|
|
|
|
|
* the same number of methods.
|
|
|
|
|
*/
|
|
|
|
|
public function testNumberOfMethodsInThisClass()
|
|
|
|
|
{
|
2012-07-12 22:34:02 -04:00
|
|
|
$methods = get_class_methods('RestClient'); $this->assertTrue( count($methods) == 20);
|
2012-07-12 20:40:06 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::__construct
|
|
|
|
|
* @todo Implement test__construct().
|
|
|
|
|
*/
|
|
|
|
|
public function test__construct()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', '__construct');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2012-07-12 20:40:06 -04:00
|
|
|
* @covers RestClient::execute
|
|
|
|
|
* @todo Implement testexecute().
|
2012-05-10 20:51:34 -04:00
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testexecute()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('execute', $methods ), 'exists method execute' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'execute');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::getHeaders
|
|
|
|
|
* @todo Implement testgetHeaders().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testgetHeaders()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('getHeaders', $methods ), 'exists method getHeaders' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'getHeaders');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::getResponse
|
|
|
|
|
* @todo Implement testgetResponse().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testgetResponse()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('getResponse', $methods ), 'exists method getResponse' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'getResponse');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::getResponseCode
|
|
|
|
|
* @todo Implement testgetResponseCode().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testgetResponseCode()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('getResponseCode', $methods ), 'exists method getResponseCode' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'getResponseCode');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::getResponseMessage
|
|
|
|
|
* @todo Implement testgetResponseMessage().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testgetResponseMessage()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('getResponseMessage', $methods ), 'exists method getResponseMessage' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'getResponseMessage');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::getResponseContentType
|
|
|
|
|
* @todo Implement testgetResponseContentType().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testgetResponseContentType()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('getResponseContentType', $methods ), 'exists method getResponseContentType' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'getResponseContentType');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::setNoFollow
|
|
|
|
|
* @todo Implement testsetNoFollow().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testsetNoFollow()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('setNoFollow', $methods ), 'exists method setNoFollow' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'setNoFollow');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::close
|
|
|
|
|
* @todo Implement testclose().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testclose()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('close', $methods ), 'exists method close' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'close');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::setUrl
|
|
|
|
|
* @todo Implement testsetUrl().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testsetUrl()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('setUrl', $methods ), 'exists method setUrl' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'setUrl');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'url');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::setContentType
|
|
|
|
|
* @todo Implement testsetContentType().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testsetContentType()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('setContentType', $methods ), 'exists method setContentType' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'setContentType');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'contentType');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::setCredentials
|
|
|
|
|
* @todo Implement testsetCredentials().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testsetCredentials()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('setCredentials', $methods ), 'exists method setCredentials' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'setCredentials');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'user');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'pass');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::setMethod
|
|
|
|
|
* @todo Implement testsetMethod().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testsetMethod()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('setMethod', $methods ), 'exists method setMethod' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'setMethod');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'method');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::setParameters
|
|
|
|
|
* @todo Implement testsetParameters().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testsetParameters()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('setParameters', $methods ), 'exists method setParameters' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'setParameters');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'params');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::createClient
|
|
|
|
|
* @todo Implement testcreateClient().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testcreateClient()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('createClient', $methods ), 'exists method createClient' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'createClient');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'url');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::post
|
|
|
|
|
* @todo Implement testpost().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testpost()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('post', $methods ), 'exists method post' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'post');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'url');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'params');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'user');
|
|
|
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[2]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[3]->getName() == 'pwd');
|
|
|
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[3]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[4]->getName() == 'contentType');
|
|
|
|
|
$this->assertTrue( $params[4]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[4]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[4]->getDefaultValue() == 'multipart/form-data');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::put
|
|
|
|
|
* @todo Implement testput().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testput()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('put', $methods ), 'exists method put' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'put');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'url');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'body');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'user');
|
|
|
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[2]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[3]->getName() == 'pwd');
|
|
|
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[3]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[4]->getName() == 'contentType');
|
|
|
|
|
$this->assertTrue( $params[4]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[4]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::get
|
|
|
|
|
* @todo Implement testget().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testget()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('get', $methods ), 'exists method get' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'get');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'url');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'user');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'pwd');
|
|
|
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[2]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[3]->getName() == 'contentType');
|
|
|
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[3]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::delete
|
|
|
|
|
* @todo Implement testdelete().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testdelete()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('delete', $methods ), 'exists method delete' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'delete');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'url');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'user');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'pwd');
|
|
|
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[2]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[3]->getName() == 'contentType');
|
|
|
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[3]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers RestClient::call
|
|
|
|
|
* @todo Implement testcall().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testcall()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('call', $methods ), 'exists method call' );
|
|
|
|
|
$r = new ReflectionMethod('RestClient', 'call');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'method');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'url');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'body');
|
|
|
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[2]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[3]->getName() == 'user');
|
|
|
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[3]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[4]->getName() == 'pwd');
|
|
|
|
|
$this->assertTrue( $params[4]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[4]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[5]->getName() == 'contentType');
|
|
|
|
|
$this->assertTrue( $params[5]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[5]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[5]->getDefaultValue() == '');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|