HOR-3560
This commit is contained in:
@@ -1,346 +0,0 @@
|
||||
<?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.controller.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classControllerTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Controller
|
||||
*/
|
||||
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 Controller();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('Controller'); $this->assertTrue( count($methods) == 19);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::__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('Controller', '__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 Controller::__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('Controller', '__get');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'name');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::__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('Controller', '__isset');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'name');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::__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('Controller', '__unset');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'name');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::setResponseType
|
||||
* @todo Implement testsetResponseType().
|
||||
*/
|
||||
public function testsetResponseType()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setResponseType', $methods ), 'exists method setResponseType' );
|
||||
$r = new ReflectionMethod('Controller', 'setResponseType');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'type');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::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('Controller', 'call');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'name');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::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('Controller', 'setHttpRequestData');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'data');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::setDebug
|
||||
* @todo Implement testsetDebug().
|
||||
*/
|
||||
public function testsetDebug()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setDebug', $methods ), 'exists method setDebug' );
|
||||
$r = new ReflectionMethod('Controller', 'setDebug');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'val');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::getDebug
|
||||
* @todo Implement testgetDebug().
|
||||
*/
|
||||
public function testgetDebug()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDebug', $methods ), 'exists method getDebug' );
|
||||
$r = new ReflectionMethod('Controller', 'getDebug');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::includeExtJSLib
|
||||
* @todo Implement testincludeExtJSLib().
|
||||
*/
|
||||
public function testincludeExtJSLib()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('includeExtJSLib', $methods ), 'exists method includeExtJSLib' );
|
||||
$r = new ReflectionMethod('Controller', 'includeExtJSLib');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'srcFile');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'debug');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::includeExtJS
|
||||
* @todo Implement testincludeExtJS().
|
||||
*/
|
||||
public function testincludeExtJS()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('includeExtJS', $methods ), 'exists method includeExtJS' );
|
||||
$r = new ReflectionMethod('Controller', 'includeExtJS');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'srcFile');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'debug');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::setView
|
||||
* @todo Implement testsetView().
|
||||
*/
|
||||
public function testsetView()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setView', $methods ), 'exists method setView' );
|
||||
$r = new ReflectionMethod('Controller', 'setView');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'file');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::setJSVar
|
||||
* @todo Implement testsetJSVar().
|
||||
*/
|
||||
public function testsetJSVar()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setJSVar', $methods ), 'exists method setJSVar' );
|
||||
$r = new ReflectionMethod('Controller', 'setJSVar');
|
||||
$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 Controller::setVar
|
||||
* @todo Implement testsetVar().
|
||||
*/
|
||||
public function testsetVar()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setVar', $methods ), 'exists method setVar' );
|
||||
$r = new ReflectionMethod('Controller', 'setVar');
|
||||
$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 Controller::getHeadPublisher
|
||||
* @todo Implement testgetHeadPublisher().
|
||||
*/
|
||||
public function testgetHeadPublisher()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getHeadPublisher', $methods ), 'exists method getHeadPublisher' );
|
||||
$r = new ReflectionMethod('Controller', 'getHeadPublisher');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::setLayout
|
||||
* @todo Implement testsetLayout().
|
||||
*/
|
||||
public function testsetLayout()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setLayout', $methods ), 'exists method setLayout' );
|
||||
$r = new ReflectionMethod('Controller', 'setLayout');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'layout');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('Controller', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'type');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == 'mvc');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::header
|
||||
* @todo Implement testheader().
|
||||
*/
|
||||
public function testheader()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('header', $methods ), 'exists method header' );
|
||||
$r = new ReflectionMethod('Controller', 'header');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'header');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Controller::redirect
|
||||
* @todo Implement testredirect().
|
||||
*/
|
||||
public function testredirect()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('redirect', $methods ), 'exists method redirect' );
|
||||
$r = new ReflectionMethod('Controller', 'redirect');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'url');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,210 +0,0 @@
|
||||
<?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.dbtable.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
||||
*/
|
||||
|
||||
class classDBTableTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var DBTable
|
||||
*/
|
||||
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 DBTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('DBTable'); $this->assertTrue( count($methods) == 11);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DBTable::dBTable
|
||||
* @todo Implement testdBTable().
|
||||
*/
|
||||
public function testdBTable()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('dBTable', $methods ), 'exists method dBTable' );
|
||||
$r = new ReflectionMethod('DBTable', 'dBTable');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'objConnection');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'strTable');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'arrKeys');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == array( 'UID' ));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DBTable::setTo
|
||||
* @todo Implement testsetTo().
|
||||
*/
|
||||
public function testsetTo()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setTo', $methods ), 'exists method setTo' );
|
||||
$r = new ReflectionMethod('DBTable', 'setTo');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'objDBConnection');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'strTable');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'arrKeys');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == array( 'UID' ));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DBTable::loadEmpty
|
||||
* @todo Implement testloadEmpty().
|
||||
*/
|
||||
public function testloadEmpty()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('loadEmpty', $methods ), 'exists method loadEmpty' );
|
||||
$r = new ReflectionMethod('DBTable', 'loadEmpty');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DBTable::loadWhere
|
||||
* @todo Implement testloadWhere().
|
||||
*/
|
||||
public function testloadWhere()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('loadWhere', $methods ), 'exists method loadWhere' );
|
||||
$r = new ReflectionMethod('DBTable', 'loadWhere');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'strWhere');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DBTable::load
|
||||
* @todo Implement testload().
|
||||
*/
|
||||
public function testload()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('load', $methods ), 'exists method load' );
|
||||
$r = new ReflectionMethod('DBTable', 'load');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DBTable::nextvalPGSql
|
||||
* @todo Implement testnextvalPGSql().
|
||||
*/
|
||||
public function testnextvalPGSql()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('nextvalPGSql', $methods ), 'exists method nextvalPGSql' );
|
||||
$r = new ReflectionMethod('DBTable', 'nextvalPGSql');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'seq');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DBTable::insert
|
||||
* @todo Implement testinsert().
|
||||
*/
|
||||
public function testinsert()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('insert', $methods ), 'exists method insert' );
|
||||
$r = new ReflectionMethod('DBTable', 'insert');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DBTable::update
|
||||
* @todo Implement testupdate().
|
||||
*/
|
||||
public function testupdate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('update', $methods ), 'exists method update' );
|
||||
$r = new ReflectionMethod('DBTable', 'update');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DBTable::save
|
||||
* @todo Implement testsave().
|
||||
*/
|
||||
public function testsave()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('save', $methods ), 'exists method save' );
|
||||
$r = new ReflectionMethod('DBTable', 'save');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DBTable::delete
|
||||
* @todo Implement testdelete().
|
||||
*/
|
||||
public function testdelete()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('delete', $methods ), 'exists method delete' );
|
||||
$r = new ReflectionMethod('DBTable', 'delete');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DBTable::next
|
||||
* @todo Implement testnext().
|
||||
*/
|
||||
public function testnext()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('next', $methods ), 'exists method next' );
|
||||
$r = new ReflectionMethod('DBTable', 'next');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,449 +0,0 @@
|
||||
<?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.dbMaintenance.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
||||
*/
|
||||
|
||||
class classDataBaseMaintenanceTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var DataBaseMaintenance
|
||||
*/
|
||||
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 DataBaseMaintenance();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('DataBaseMaintenance'); $this->assertTrue( count($methods) == 27);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::__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('DataBaseMaintenance', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'host');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$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() == 'passwd');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::setUser
|
||||
* @todo Implement testsetUser().
|
||||
*/
|
||||
public function testsetUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setUser', $methods ), 'exists method setUser' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'setUser');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'user');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::setPasswd
|
||||
* @todo Implement testsetPasswd().
|
||||
*/
|
||||
public function testsetPasswd()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setPasswd', $methods ), 'exists method setPasswd' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'setPasswd');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'passwd');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::setHost
|
||||
* @todo Implement testsetHost().
|
||||
*/
|
||||
public function testsetHost()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setHost', $methods ), 'exists method setHost' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'setHost');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'host');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::setTempDir
|
||||
* @todo Implement testsetTempDir().
|
||||
*/
|
||||
public function testsetTempDir()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setTempDir', $methods ), 'exists method setTempDir' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'setTempDir');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'tmpDir');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::getTempDir
|
||||
* @todo Implement testgetTempDir().
|
||||
*/
|
||||
public function testgetTempDir()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getTempDir', $methods ), 'exists method getTempDir' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'getTempDir');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::status
|
||||
* @todo Implement teststatus().
|
||||
*/
|
||||
public function teststatus()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('status', $methods ), 'exists method status' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'status');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::connect
|
||||
* @todo Implement testconnect().
|
||||
*/
|
||||
public function testconnect()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('connect', $methods ), 'exists method connect' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'connect');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'dbname');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::setDbName
|
||||
* @todo Implement testsetDbName().
|
||||
*/
|
||||
public function testsetDbName()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setDbName', $methods ), 'exists method setDbName' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'setDbName');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'dbname');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::selectDataBase
|
||||
* @todo Implement testselectDataBase().
|
||||
*/
|
||||
public function testselectDataBase()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('selectDataBase', $methods ), 'exists method selectDataBase' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'selectDataBase');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'dbname');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::query
|
||||
* @todo Implement testquery().
|
||||
*/
|
||||
public function testquery()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('query', $methods ), 'exists method query' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'query');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sql');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::error
|
||||
* @todo Implement testerror().
|
||||
*/
|
||||
public function testerror()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('error', $methods ), 'exists method error' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'error');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::getTablesList
|
||||
* @todo Implement testgetTablesList().
|
||||
*/
|
||||
public function testgetTablesList()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getTablesList', $methods ), 'exists method getTablesList' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'getTablesList');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::dumpData
|
||||
* @todo Implement testdumpData().
|
||||
*/
|
||||
public function testdumpData()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('dumpData', $methods ), 'exists method dumpData' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'dumpData');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'table');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::restoreData
|
||||
* @todo Implement testrestoreData().
|
||||
*/
|
||||
public function testrestoreData()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('restoreData', $methods ), 'exists method restoreData' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'restoreData');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'backupFile');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::backupData
|
||||
* @todo Implement testbackupData().
|
||||
*/
|
||||
public function testbackupData()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('backupData', $methods ), 'exists method backupData' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'backupData');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::backupSqlData
|
||||
* @todo Implement testbackupSqlData().
|
||||
*/
|
||||
public function testbackupSqlData()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('backupSqlData', $methods ), 'exists method backupSqlData' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'backupSqlData');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::restoreAllData
|
||||
* @todo Implement testrestoreAllData().
|
||||
*/
|
||||
public function testrestoreAllData()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('restoreAllData', $methods ), 'exists method restoreAllData' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'restoreAllData');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'type');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::createDb
|
||||
* @todo Implement testcreateDb().
|
||||
*/
|
||||
public function testcreateDb()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('createDb', $methods ), 'exists method createDb' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'createDb');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'dbname');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'drop');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::restoreFromSql2
|
||||
* @todo Implement testrestoreFromSql2().
|
||||
*/
|
||||
public function testrestoreFromSql2()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('restoreFromSql2', $methods ), 'exists method restoreFromSql2' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'restoreFromSql2');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sqlfile');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::lockTables
|
||||
* @todo Implement testlockTables().
|
||||
*/
|
||||
public function testlockTables()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('lockTables', $methods ), 'exists method lockTables' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'lockTables');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::unlockTables
|
||||
* @todo Implement testunlockTables().
|
||||
*/
|
||||
public function testunlockTables()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('unlockTables', $methods ), 'exists method unlockTables' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'unlockTables');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::dumpSqlInserts
|
||||
* @todo Implement testdumpSqlInserts().
|
||||
*/
|
||||
public function testdumpSqlInserts()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('dumpSqlInserts', $methods ), 'exists method dumpSqlInserts' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'dumpSqlInserts');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'table');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::backupDataBase
|
||||
* @todo Implement testbackupDataBase().
|
||||
*/
|
||||
public function testbackupDataBase()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('backupDataBase', $methods ), 'exists method backupDataBase' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'backupDataBase');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'outfile');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::restoreFromSql
|
||||
* @todo Implement testrestoreFromSql().
|
||||
*/
|
||||
public function testrestoreFromSql()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('restoreFromSql', $methods ), 'exists method restoreFromSql' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'restoreFromSql');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sqlfile');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'type');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'file');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::getSchemaFromTable
|
||||
* @todo Implement testgetSchemaFromTable().
|
||||
*/
|
||||
public function testgetSchemaFromTable()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getSchemaFromTable', $methods ), 'exists method getSchemaFromTable' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'getSchemaFromTable');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'tablename');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DataBaseMaintenance::removeCommentsIntoString
|
||||
* @todo Implement testremoveCommentsIntoString().
|
||||
*/
|
||||
public function testremoveCommentsIntoString()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('removeCommentsIntoString', $methods ), 'exists method removeCommentsIntoString' );
|
||||
$r = new ReflectionMethod('DataBaseMaintenance', 'removeCommentsIntoString');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'str');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,242 +0,0 @@
|
||||
<?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.form.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
||||
*/
|
||||
|
||||
class classFormTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Form
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$file='login/login';
|
||||
$home=PATH_TRUNK . 'workflow/engine/xmlform/';
|
||||
$this->object = new Form($file, $home);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('Form'); $this->assertTrue( count($methods) == 13);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Form::setDefaultValues
|
||||
* @todo Implement testsetDefaultValues().
|
||||
*/
|
||||
public function testsetDefaultValues()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setDefaultValues', $methods ), 'exists method setDefaultValues' );
|
||||
$r = new ReflectionMethod('Form', 'setDefaultValues');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Form::Form
|
||||
* @todo Implement testForm().
|
||||
*/
|
||||
public function testForm()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('Form', $methods ), 'exists method Form' );
|
||||
$r = new ReflectionMethod('Form', 'Form');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'filename');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'home');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'language');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'forceParse');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'visual_frontend');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Form::printTemplate
|
||||
* @todo Implement testprintTemplate().
|
||||
*/
|
||||
public function testprintTemplate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printTemplate', $methods ), 'exists method printTemplate' );
|
||||
$r = new ReflectionMethod('Form', 'printTemplate');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'template');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'scriptContent');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Form::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('Form', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'template');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'scriptContent');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Form::setValues
|
||||
* @todo Implement testsetValues().
|
||||
*/
|
||||
public function testsetValues()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setValues', $methods ), 'exists method setValues' );
|
||||
$r = new ReflectionMethod('Form', 'setValues');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'newValues');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Form::getFields
|
||||
* @todo Implement testgetFields().
|
||||
*/
|
||||
public function testgetFields()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getFields', $methods ), 'exists method getFields' );
|
||||
$r = new ReflectionMethod('Form', 'getFields');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'template');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'therow');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '-1');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Form::validatePost
|
||||
* @todo Implement testvalidatePost().
|
||||
*/
|
||||
public function testvalidatePost()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('validatePost', $methods ), 'exists method validatePost' );
|
||||
$r = new ReflectionMethod('Form', 'validatePost');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Form::validateArray
|
||||
* @todo Implement testvalidateArray().
|
||||
*/
|
||||
public function testvalidateArray()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('validateArray', $methods ), 'exists method validateArray' );
|
||||
$r = new ReflectionMethod('Form', 'validateArray');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'newValues');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Form::getVars
|
||||
* @todo Implement testgetVars().
|
||||
*/
|
||||
public function testgetVars()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getVars', $methods ), 'exists method getVars' );
|
||||
$r = new ReflectionMethod('Form', 'getVars');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'bWhitSystemVars');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '1');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Form::validateRequiredFields
|
||||
* @todo Implement testvalidateRequiredFields().
|
||||
*/
|
||||
public function testvalidateRequiredFields()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('validateRequiredFields', $methods ), 'exists method validateRequiredFields' );
|
||||
$r = new ReflectionMethod('Form', 'validateRequiredFields');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'dataFields');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'noRequired');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Form::validateFields
|
||||
* @todo Implement testvalidateFields().
|
||||
*/
|
||||
public function testvalidateFields()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('validateFields', $methods ), 'exists method validateFields' );
|
||||
$r = new ReflectionMethod('Form', 'validateFields');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'data');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,92 +0,0 @@
|
||||
<?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.error.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classG_ErrorTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var G_Error
|
||||
*/
|
||||
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 G_Error();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('G_Error'); $this->assertTrue( count($methods) == 13);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers G_Error::G_Error
|
||||
* @todo Implement testG_Error().
|
||||
*/
|
||||
public function testG_Error()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('G_Error', $methods ), 'exists method G_Error' );
|
||||
$r = new ReflectionMethod('G_Error', 'G_Error');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'code');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '-100');
|
||||
$this->assertTrue( $params[1]->getName() == 'mode');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '1');
|
||||
$this->assertTrue( $params[2]->getName() == 'level');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '1024');
|
||||
$this->assertTrue( $params[3]->getName() == 'debuginfo');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers G_Error::errorMessage
|
||||
* @todo Implement testerrorMessage().
|
||||
*/
|
||||
public function testerrorMessage()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('errorMessage', $methods ), 'exists method errorMessage' );
|
||||
$r = new ReflectionMethod('G_Error', 'errorMessage');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'code');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,158 +0,0 @@
|
||||
<?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.helper.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
||||
*/
|
||||
|
||||
class classHelperTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Helper
|
||||
*/
|
||||
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 Helper();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('Helper'); $this->assertTrue( count($methods) == 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Helper::__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('Helper', '__construct');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Helper::addFile
|
||||
* @todo Implement testaddFile().
|
||||
*/
|
||||
public function testaddFile()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addFile', $methods ), 'exists method addFile' );
|
||||
$r = new ReflectionMethod('Helper', 'addFile');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'file');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Helper::addContent
|
||||
* @todo Implement testaddContent().
|
||||
*/
|
||||
public function testaddContent()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addContent', $methods ), 'exists method addContent' );
|
||||
$r = new ReflectionMethod('Helper', 'addContent');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'content');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Helper::setContentType
|
||||
* @todo Implement testsetContentType().
|
||||
*/
|
||||
public function testsetContentType()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setContentType', $methods ), 'exists method setContentType' );
|
||||
$r = new ReflectionMethod('Helper', 'setContentType');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'ctype');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Helper::init
|
||||
* @todo Implement testinit().
|
||||
*/
|
||||
public function testinit()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('init', $methods ), 'exists method init' );
|
||||
$r = new ReflectionMethod('Helper', 'init');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Helper::minify
|
||||
* @todo Implement testminify().
|
||||
*/
|
||||
public function testminify()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('minify', $methods ), 'exists method minify' );
|
||||
$r = new ReflectionMethod('Helper', 'minify');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Helper::flush
|
||||
* @todo Implement testflush().
|
||||
*/
|
||||
public function testflush()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('flush', $methods ), 'exists method flush' );
|
||||
$r = new ReflectionMethod('Helper', 'flush');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Helper::serve
|
||||
* @todo Implement testserve().
|
||||
*/
|
||||
public function testserve()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('serve', $methods ), 'exists method serve' );
|
||||
$r = new ReflectionMethod('Helper', 'serve');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'type');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,172 +0,0 @@
|
||||
<?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) == 9);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,270 +0,0 @@
|
||||
<?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.menu.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classMenuTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Menu
|
||||
*/
|
||||
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 Menu();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('Menu'); $this->assertTrue( count($methods) == 11);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Menu::SetClass
|
||||
* @todo Implement testSetClass().
|
||||
*/
|
||||
public function testSetClass()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('SetClass', $methods ), 'exists method SetClass' );
|
||||
$r = new ReflectionMethod('Menu', 'SetClass');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'strClass');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == 'mnu');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Menu::Load
|
||||
* @todo Implement testLoad().
|
||||
*/
|
||||
public function testLoad()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('Load', $methods ), 'exists method Load' );
|
||||
$r = new ReflectionMethod('Menu', 'Load');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'strMenuName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Menu::OptionCount
|
||||
* @todo Implement testOptionCount().
|
||||
*/
|
||||
public function testOptionCount()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('OptionCount', $methods ), 'exists method OptionCount' );
|
||||
$r = new ReflectionMethod('Menu', 'OptionCount');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Menu::AddOption
|
||||
* @todo Implement testAddOption().
|
||||
*/
|
||||
public function testAddOption()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('AddOption', $methods ), 'exists method AddOption' );
|
||||
$r = new ReflectionMethod('Menu', 'AddOption');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'strLabel');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'strURL');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'strType');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == 'plugins');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Menu::AddIdOption
|
||||
* @todo Implement testAddIdOption().
|
||||
*/
|
||||
public function testAddIdOption()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('AddIdOption', $methods ), 'exists method AddIdOption' );
|
||||
$r = new ReflectionMethod('Menu', 'AddIdOption');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'strId');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'strLabel');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'strURL');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'strType');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == 'plugins');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Menu::AddRawOption
|
||||
* @todo Implement testAddRawOption().
|
||||
*/
|
||||
public function testAddRawOption()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('AddRawOption', $methods ), 'exists method AddRawOption' );
|
||||
$r = new ReflectionMethod('Menu', 'AddRawOption');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'strURL');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'strType');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'plugins');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Menu::AddIdRawOption
|
||||
* @todo Implement testAddIdRawOption().
|
||||
*/
|
||||
public function testAddIdRawOption()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('AddIdRawOption', $methods ), 'exists method AddIdRawOption' );
|
||||
$r = new ReflectionMethod('Menu', 'AddIdRawOption');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'strId');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'strURL');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'label');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'icon');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'js');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[5]->getName() == 'strType');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == true);
|
||||
$this->assertTrue( $params[5]->getDefaultValue() == 'plugins');
|
||||
$this->assertTrue( $params[6]->getName() == 'elementClass');
|
||||
$this->assertTrue( $params[6]->isArray() == false);
|
||||
$this->assertTrue( $params[6]->isOptional () == true);
|
||||
$this->assertTrue( $params[6]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Menu::DisableOptionPos
|
||||
* @todo Implement testDisableOptionPos().
|
||||
*/
|
||||
public function testDisableOptionPos()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('DisableOptionPos', $methods ), 'exists method DisableOptionPos' );
|
||||
$r = new ReflectionMethod('Menu', 'DisableOptionPos');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'intPos');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Menu::DisableOptionId
|
||||
* @todo Implement testDisableOptionId().
|
||||
*/
|
||||
public function testDisableOptionId()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('DisableOptionId', $methods ), 'exists method DisableOptionId' );
|
||||
$r = new ReflectionMethod('Menu', 'DisableOptionId');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'id');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Menu::RenderOption
|
||||
* @todo Implement testRenderOption().
|
||||
*/
|
||||
public function testRenderOption()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('RenderOption', $methods ), 'exists method RenderOption' );
|
||||
$r = new ReflectionMethod('Menu', 'RenderOption');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'intPos');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Menu::generateArrayForTemplate
|
||||
* @todo Implement testgenerateArrayForTemplate().
|
||||
*/
|
||||
public function testgenerateArrayForTemplate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('generateArrayForTemplate', $methods ), 'exists method generateArrayForTemplate' );
|
||||
$r = new ReflectionMethod('Menu', 'generateArrayForTemplate');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'G_MAIN_MENU');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'classOn');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'classOff');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'G_MENU_SELECTED');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == false);
|
||||
$this->assertTrue( $params[4]->getName() == 'G_ID_MENU_SELECTED');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
<?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.phpSqlParser.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classPHPSQLParserTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var PHPSQLParser
|
||||
*/
|
||||
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 PHPSQLParser();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('PHPSQLParser'); $this->assertTrue( count($methods) == 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHPSQLParser::__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('PHPSQLParser', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sql');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHPSQLParser::parse
|
||||
* @todo Implement testparse().
|
||||
*/
|
||||
public function testparse()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('parse', $methods ), 'exists method parse' );
|
||||
$r = new ReflectionMethod('PHPSQLParser', 'parse');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sql');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHPSQLParser::process_insert
|
||||
* @todo Implement testprocess_insert().
|
||||
*/
|
||||
public function testprocess_insert()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('process_insert', $methods ), 'exists method process_insert' );
|
||||
$r = new ReflectionMethod('PHPSQLParser', 'process_insert');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'tokens');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'token_category');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'INSERT');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PHPSQLParser::load_reserved_words
|
||||
* @todo Implement testload_reserved_words().
|
||||
*/
|
||||
public function testload_reserved_words()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('load_reserved_words', $methods ), 'exists method load_reserved_words' );
|
||||
$r = new ReflectionMethod('PHPSQLParser', 'load_reserved_words');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
<?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.pmException.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classPMExceptionTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var PMException
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$message= 'PHPUnit test';
|
||||
$this->object = new PMException($message );
|
||||
}
|
||||
|
||||
/**
|
||||
* 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()
|
||||
{
|
||||
$class = new ReflectionClass('PMException');
|
||||
$methods = $class->getMethods( ReflectionMethod::IS_PUBLIC );
|
||||
//$this->assertTrue( count($methods) == 9 );
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMException::__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('PMException', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'message');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'code');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '0');
|
||||
$this->assertTrue( $params[2]->getName() == 'previous');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMException::__toString
|
||||
* @todo Implement test__toString().
|
||||
*/
|
||||
public function test__toString()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__toString', $methods ), 'exists method __toString' );
|
||||
$r = new ReflectionMethod('PMException', '__toString');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
<?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.publisher.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
||||
*/
|
||||
|
||||
class classPublisherTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Publisher
|
||||
*/
|
||||
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 Publisher();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('Publisher'); $this->assertTrue( count($methods) == 3);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Publisher::AddContent
|
||||
* @todo Implement testAddContent().
|
||||
*/
|
||||
public function testAddContent()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('AddContent', $methods ), 'exists method AddContent' );
|
||||
$r = new ReflectionMethod('Publisher', 'AddContent');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'strType');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == 'form');
|
||||
$this->assertTrue( $params[1]->getName() == 'strLayout');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'form');
|
||||
$this->assertTrue( $params[2]->getName() == 'strName');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'strContent');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'arrData');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[5]->getName() == 'strTarget');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == true);
|
||||
$this->assertTrue( $params[5]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[6]->getName() == 'ajaxServer');
|
||||
$this->assertTrue( $params[6]->isArray() == false);
|
||||
$this->assertTrue( $params[6]->isOptional () == true);
|
||||
$this->assertTrue( $params[6]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[7]->getName() == 'mode');
|
||||
$this->assertTrue( $params[7]->isArray() == false);
|
||||
$this->assertTrue( $params[7]->isOptional () == true);
|
||||
$this->assertTrue( $params[7]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[8]->getName() == 'bAbsolutePath');
|
||||
$this->assertTrue( $params[8]->isArray() == false);
|
||||
$this->assertTrue( $params[8]->isOptional () == true);
|
||||
$this->assertTrue( $params[8]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Publisher::RenderContent
|
||||
* @todo Implement testRenderContent().
|
||||
*/
|
||||
public function testRenderContent()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('RenderContent', $methods ), 'exists method RenderContent' );
|
||||
$r = new ReflectionMethod('Publisher', 'RenderContent');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'intPos');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '0');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Publisher::RenderContent0
|
||||
* @todo Implement testRenderContent0().
|
||||
*/
|
||||
public function testRenderContent0()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('RenderContent0', $methods ), 'exists method RenderContent0' );
|
||||
$r = new ReflectionMethod('Publisher', 'RenderContent0');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'intPos');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '0');
|
||||
$this->assertTrue( $params[1]->getName() == 'showXMLFormName');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,922 +0,0 @@
|
||||
<?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.rbac.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
||||
*/
|
||||
|
||||
class classRBACTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var RBAC
|
||||
*/
|
||||
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 RBAC();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('RBAC');
|
||||
$this->assertTrue( count($methods) == 55, "now there are " . count($methods) . " methods.");
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::__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('RBAC', '__construct');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getSingleton
|
||||
* @todo Implement testgetSingleton().
|
||||
*/
|
||||
public function testgetSingleton()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getSingleton', $methods ), 'exists method getSingleton' );
|
||||
$r = new ReflectionMethod('RBAC', 'getSingleton');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::initRBAC
|
||||
* @todo Implement testinitRBAC().
|
||||
*/
|
||||
public function testinitRBAC()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('initRBAC', $methods ), 'exists method initRBAC' );
|
||||
$r = new ReflectionMethod('RBAC', 'initRBAC');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::loadUserRolePermission
|
||||
* @todo Implement testloadUserRolePermission().
|
||||
*/
|
||||
public function testloadUserRolePermission()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('loadUserRolePermission', $methods ), 'exists method loadUserRolePermission' );
|
||||
$r = new ReflectionMethod('RBAC', 'loadUserRolePermission');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sSystem');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sUser');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::checkAutomaticRegister
|
||||
* @todo Implement testcheckAutomaticRegister().
|
||||
*/
|
||||
public function testcheckAutomaticRegister()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('checkAutomaticRegister', $methods ), 'exists method checkAutomaticRegister' );
|
||||
$r = new ReflectionMethod('RBAC', 'checkAutomaticRegister');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'strUser');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'strPass');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::VerifyWithOtherAuthenticationSource
|
||||
* @todo Implement testVerifyWithOtherAuthenticationSource().
|
||||
*/
|
||||
public function testVerifyWithOtherAuthenticationSource()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('VerifyWithOtherAuthenticationSource', $methods ), 'exists method VerifyWithOtherAuthenticationSource' );
|
||||
$r = new ReflectionMethod('RBAC', 'VerifyWithOtherAuthenticationSource');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sAuthType');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'aUserFields');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'strPass');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::VerifyLogin
|
||||
* @todo Implement testVerifyLogin().
|
||||
*/
|
||||
public function testVerifyLogin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('VerifyLogin', $methods ), 'exists method VerifyLogin' );
|
||||
$r = new ReflectionMethod('RBAC', 'VerifyLogin');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'strUser');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'strPass');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::verifyUser
|
||||
* @todo Implement testverifyUser().
|
||||
*/
|
||||
public function testverifyUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('verifyUser', $methods ), 'exists method verifyUser' );
|
||||
$r = new ReflectionMethod('RBAC', 'verifyUser');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'strUser');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::verifyUserId
|
||||
* @todo Implement testverifyUserId().
|
||||
*/
|
||||
public function testverifyUserId()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('verifyUserId', $methods ), 'exists method verifyUserId' );
|
||||
$r = new ReflectionMethod('RBAC', 'verifyUserId');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'strUserId');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::userCanAccess
|
||||
* @todo Implement testuserCanAccess().
|
||||
*/
|
||||
public function testuserCanAccess()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('userCanAccess', $methods ), 'exists method userCanAccess' );
|
||||
$r = new ReflectionMethod('RBAC', 'userCanAccess');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'perm');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::createUser
|
||||
* @todo Implement testcreateUser().
|
||||
*/
|
||||
public function testcreateUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('createUser', $methods ), 'exists method createUser' );
|
||||
$r = new ReflectionMethod('RBAC', 'createUser');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[1]->getName() == 'sRolCode');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::updateUser
|
||||
* @todo Implement testupdateUser().
|
||||
*/
|
||||
public function testupdateUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('updateUser', $methods ), 'exists method updateUser' );
|
||||
$r = new ReflectionMethod('RBAC', 'updateUser');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == array());
|
||||
$this->assertTrue( $params[1]->getName() == 'sRolCode');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::assignRoleToUser
|
||||
* @todo Implement testassignRoleToUser().
|
||||
*/
|
||||
public function testassignRoleToUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('assignRoleToUser', $methods ), 'exists method assignRoleToUser' );
|
||||
$r = new ReflectionMethod('RBAC', 'assignRoleToUser');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'sRolCode');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::removeRolesFromUser
|
||||
* @todo Implement testremoveRolesFromUser().
|
||||
*/
|
||||
public function testremoveRolesFromUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('removeRolesFromUser', $methods ), 'exists method removeRolesFromUser' );
|
||||
$r = new ReflectionMethod('RBAC', 'removeRolesFromUser');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::changeUserStatus
|
||||
* @todo Implement testchangeUserStatus().
|
||||
*/
|
||||
public function testchangeUserStatus()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('changeUserStatus', $methods ), 'exists method changeUserStatus' );
|
||||
$r = new ReflectionMethod('RBAC', 'changeUserStatus');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'sStatus');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'ACTIVE');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::removeUser
|
||||
* @todo Implement testremoveUser().
|
||||
*/
|
||||
public function testremoveUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('removeUser', $methods ), 'exists method removeUser' );
|
||||
$r = new ReflectionMethod('RBAC', 'removeUser');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::load
|
||||
* @todo Implement testload().
|
||||
*/
|
||||
public function testload()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('load', $methods ), 'exists method load' );
|
||||
$r = new ReflectionMethod('RBAC', 'load');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'uid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::createPermision
|
||||
* @todo Implement testcreatePermision().
|
||||
*/
|
||||
public function testcreatePermision()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('createPermision', $methods ), 'exists method createPermision' );
|
||||
$r = new ReflectionMethod('RBAC', 'createPermision');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sCode');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::listAllRoles
|
||||
* @todo Implement testlistAllRoles().
|
||||
*/
|
||||
public function testlistAllRoles()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('listAllRoles', $methods ), 'exists method listAllRoles' );
|
||||
$r = new ReflectionMethod('RBAC', 'listAllRoles');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'systemCode');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == 'PROCESSMAKER');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getAllRoles
|
||||
* @todo Implement testgetAllRoles().
|
||||
*/
|
||||
public function testgetAllRoles()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAllRoles', $methods ), 'exists method getAllRoles' );
|
||||
$r = new ReflectionMethod('RBAC', 'getAllRoles');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'systemCode');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == 'PROCESSMAKER');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getAllRolesFilter
|
||||
* @todo Implement testgetAllRolesFilter().
|
||||
*/
|
||||
public function testgetAllRolesFilter()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAllRolesFilter', $methods ), 'exists method getAllRolesFilter' );
|
||||
$r = new ReflectionMethod('RBAC', 'getAllRolesFilter');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'start');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'limit');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'filter');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::listAllPermissions
|
||||
* @todo Implement testlistAllPermissions().
|
||||
*/
|
||||
public function testlistAllPermissions()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('listAllPermissions', $methods ), 'exists method listAllPermissions' );
|
||||
$r = new ReflectionMethod('RBAC', 'listAllPermissions');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'systemCode');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == 'PROCESSMAKER');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::createRole
|
||||
* @todo Implement testcreateRole().
|
||||
*/
|
||||
public function testcreateRole()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('createRole', $methods ), 'exists method createRole' );
|
||||
$r = new ReflectionMethod('RBAC', 'createRole');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::removeRole
|
||||
* @todo Implement testremoveRole().
|
||||
*/
|
||||
public function testremoveRole()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('removeRole', $methods ), 'exists method removeRole' );
|
||||
$r = new ReflectionMethod('RBAC', 'removeRole');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'ROL_UID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::verifyNewRole
|
||||
* @todo Implement testverifyNewRole().
|
||||
*/
|
||||
public function testverifyNewRole()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('verifyNewRole', $methods ), 'exists method verifyNewRole' );
|
||||
$r = new ReflectionMethod('RBAC', 'verifyNewRole');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'code');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::updateRole
|
||||
* @todo Implement testupdateRole().
|
||||
*/
|
||||
public function testupdateRole()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('updateRole', $methods ), 'exists method updateRole' );
|
||||
$r = new ReflectionMethod('RBAC', 'updateRole');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'fields');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::loadById
|
||||
* @todo Implement testloadById().
|
||||
*/
|
||||
public function testloadById()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('loadById', $methods ), 'exists method loadById' );
|
||||
$r = new ReflectionMethod('RBAC', 'loadById');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'ROL_UID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getRoleUsers
|
||||
* @todo Implement testgetRoleUsers().
|
||||
*/
|
||||
public function testgetRoleUsers()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getRoleUsers', $methods ), 'exists method getRoleUsers' );
|
||||
$r = new ReflectionMethod('RBAC', 'getRoleUsers');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'ROL_UID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'filter');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getAllUsersByRole
|
||||
* @todo Implement testgetAllUsersByRole().
|
||||
*/
|
||||
public function testgetAllUsersByRole()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAllUsersByRole', $methods ), 'exists method getAllUsersByRole' );
|
||||
$r = new ReflectionMethod('RBAC', 'getAllUsersByRole');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getAllUsersByDepartment
|
||||
* @todo Implement testgetAllUsersByDepartment().
|
||||
*/
|
||||
public function testgetAllUsersByDepartment()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAllUsersByDepartment', $methods ), 'exists method getAllUsersByDepartment' );
|
||||
$r = new ReflectionMethod('RBAC', 'getAllUsersByDepartment');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getRoleCode
|
||||
* @todo Implement testgetRoleCode().
|
||||
*/
|
||||
public function testgetRoleCode()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getRoleCode', $methods ), 'exists method getRoleCode' );
|
||||
$r = new ReflectionMethod('RBAC', 'getRoleCode');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'ROL_UID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::deleteUserRole
|
||||
* @todo Implement testdeleteUserRole().
|
||||
*/
|
||||
public function testdeleteUserRole()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('deleteUserRole', $methods ), 'exists method deleteUserRole' );
|
||||
$r = new ReflectionMethod('RBAC', 'deleteUserRole');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'ROL_UID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'USR_UID');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getAllUsers
|
||||
* @todo Implement testgetAllUsers().
|
||||
*/
|
||||
public function testgetAllUsers()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAllUsers', $methods ), 'exists method getAllUsers' );
|
||||
$r = new ReflectionMethod('RBAC', 'getAllUsers');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'ROL_UID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'filter');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::assignUserToRole
|
||||
* @todo Implement testassignUserToRole().
|
||||
*/
|
||||
public function testassignUserToRole()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('assignUserToRole', $methods ), 'exists method assignUserToRole' );
|
||||
$r = new ReflectionMethod('RBAC', 'assignUserToRole');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getRolePermissions
|
||||
* @todo Implement testgetRolePermissions().
|
||||
*/
|
||||
public function testgetRolePermissions()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getRolePermissions', $methods ), 'exists method getRolePermissions' );
|
||||
$r = new ReflectionMethod('RBAC', 'getRolePermissions');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'ROL_UID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'filter');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getAllPermissions
|
||||
* @todo Implement testgetAllPermissions().
|
||||
*/
|
||||
public function testgetAllPermissions()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAllPermissions', $methods ), 'exists method getAllPermissions' );
|
||||
$r = new ReflectionMethod('RBAC', 'getAllPermissions');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'ROL_UID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'PER_SYSTEM');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'filter');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::assignPermissionRole
|
||||
* @todo Implement testassignPermissionRole().
|
||||
*/
|
||||
public function testassignPermissionRole()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('assignPermissionRole', $methods ), 'exists method assignPermissionRole' );
|
||||
$r = new ReflectionMethod('RBAC', 'assignPermissionRole');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::assignPermissionToRole
|
||||
* @todo Implement testassignPermissionToRole().
|
||||
*/
|
||||
public function testassignPermissionToRole()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('assignPermissionToRole', $methods ), 'exists method assignPermissionToRole' );
|
||||
$r = new ReflectionMethod('RBAC', 'assignPermissionToRole');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sRoleUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sPermissionUID');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::deletePermissionRole
|
||||
* @todo Implement testdeletePermissionRole().
|
||||
*/
|
||||
public function testdeletePermissionRole()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('deletePermissionRole', $methods ), 'exists method deletePermissionRole' );
|
||||
$r = new ReflectionMethod('RBAC', 'deletePermissionRole');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'ROL_UID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'PER_UID');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::numUsersWithRole
|
||||
* @todo Implement testnumUsersWithRole().
|
||||
*/
|
||||
public function testnumUsersWithRole()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('numUsersWithRole', $methods ), 'exists method numUsersWithRole' );
|
||||
$r = new ReflectionMethod('RBAC', 'numUsersWithRole');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'ROL_UID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::createSystem
|
||||
* @todo Implement testcreateSystem().
|
||||
*/
|
||||
public function testcreateSystem()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('createSystem', $methods ), 'exists method createSystem' );
|
||||
$r = new ReflectionMethod('RBAC', 'createSystem');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sCode');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::verifyByCode
|
||||
* @todo Implement testverifyByCode().
|
||||
*/
|
||||
public function testverifyByCode()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('verifyByCode', $methods ), 'exists method verifyByCode' );
|
||||
$r = new ReflectionMethod('RBAC', 'verifyByCode');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sCode');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getAllAuthSources
|
||||
* @todo Implement testgetAllAuthSources().
|
||||
*/
|
||||
public function testgetAllAuthSources()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAllAuthSources', $methods ), 'exists method getAllAuthSources' );
|
||||
$r = new ReflectionMethod('RBAC', 'getAllAuthSources');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getAllAuthSourcesByUser
|
||||
* @todo Implement testgetAllAuthSourcesByUser().
|
||||
*/
|
||||
public function testgetAllAuthSourcesByUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAllAuthSourcesByUser', $methods ), 'exists method getAllAuthSourcesByUser' );
|
||||
$r = new ReflectionMethod('RBAC', 'getAllAuthSourcesByUser');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getAuthenticationSources
|
||||
* @todo Implement testgetAuthenticationSources().
|
||||
*/
|
||||
public function testgetAuthenticationSources()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAuthenticationSources', $methods ), 'exists method getAuthenticationSources' );
|
||||
$r = new ReflectionMethod('RBAC', 'getAuthenticationSources');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'start');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'limit');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'filter');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getAuthSource
|
||||
* @todo Implement testgetAuthSource().
|
||||
*/
|
||||
public function testgetAuthSource()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAuthSource', $methods ), 'exists method getAuthSource' );
|
||||
$r = new ReflectionMethod('RBAC', 'getAuthSource');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::createAuthSource
|
||||
* @todo Implement testcreateAuthSource().
|
||||
*/
|
||||
public function testcreateAuthSource()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('createAuthSource', $methods ), 'exists method createAuthSource' );
|
||||
$r = new ReflectionMethod('RBAC', 'createAuthSource');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::updateAuthSource
|
||||
* @todo Implement testupdateAuthSource().
|
||||
*/
|
||||
public function testupdateAuthSource()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('updateAuthSource', $methods ), 'exists method updateAuthSource' );
|
||||
$r = new ReflectionMethod('RBAC', 'updateAuthSource');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::removeAuthSource
|
||||
* @todo Implement testremoveAuthSource().
|
||||
*/
|
||||
public function testremoveAuthSource()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('removeAuthSource', $methods ), 'exists method removeAuthSource' );
|
||||
$r = new ReflectionMethod('RBAC', 'removeAuthSource');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getAllUsersByAuthSource
|
||||
* @todo Implement testgetAllUsersByAuthSource().
|
||||
*/
|
||||
public function testgetAllUsersByAuthSource()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAllUsersByAuthSource', $methods ), 'exists method getAllUsersByAuthSource' );
|
||||
$r = new ReflectionMethod('RBAC', 'getAllUsersByAuthSource');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::getListUsersByAuthSource
|
||||
* @todo Implement testgetListUsersByAuthSource().
|
||||
*/
|
||||
public function testgetListUsersByAuthSource()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getListUsersByAuthSource', $methods ), 'exists method getListUsersByAuthSource' );
|
||||
$r = new ReflectionMethod('RBAC', 'getListUsersByAuthSource');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aSource');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::searchUsers
|
||||
* @todo Implement testsearchUsers().
|
||||
*/
|
||||
public function testsearchUsers()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('searchUsers', $methods ), 'exists method searchUsers' );
|
||||
$r = new ReflectionMethod('RBAC', 'searchUsers');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sKeyword');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::requirePermissions
|
||||
* @todo Implement testrequirePermissions().
|
||||
*/
|
||||
public function testrequirePermissions()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('requirePermissions', $methods ), 'exists method requirePermissions' );
|
||||
$r = new ReflectionMethod('RBAC', 'requirePermissions');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'permissions');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RBAC::cleanSessionFiles
|
||||
* @todo Implement testcleanSessionFiles().
|
||||
*/
|
||||
public function testcleanSessionFiles()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('cleanSessionFiles', $methods ), 'exists method cleanSessionFiles' );
|
||||
$r = new ReflectionMethod('RBAC', 'cleanSessionFiles');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'hours');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '72');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,394 +0,0 @@
|
||||
<?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';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
||||
*/
|
||||
|
||||
class classRestClientTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var RestClient
|
||||
*/
|
||||
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 RestClient();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('RestClient'); $this->assertTrue( count($methods) == 20);
|
||||
}
|
||||
|
||||
/**
|
||||
* @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();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::execute
|
||||
* @todo Implement testexecute().
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::getHeaders
|
||||
* @todo Implement testgetHeaders().
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::getResponse
|
||||
* @todo Implement testgetResponse().
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::getResponseCode
|
||||
* @todo Implement testgetResponseCode().
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::getResponseMessage
|
||||
* @todo Implement testgetResponseMessage().
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::getResponseContentType
|
||||
* @todo Implement testgetResponseContentType().
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::setNoFollow
|
||||
* @todo Implement testsetNoFollow().
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::close
|
||||
* @todo Implement testclose().
|
||||
*/
|
||||
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();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::setUrl
|
||||
* @todo Implement testsetUrl().
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::setContentType
|
||||
* @todo Implement testsetContentType().
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::setCredentials
|
||||
* @todo Implement testsetCredentials().
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::setMethod
|
||||
* @todo Implement testsetMethod().
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::setParameters
|
||||
* @todo Implement testsetParameters().
|
||||
*/
|
||||
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);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::createClient
|
||||
* @todo Implement testcreateClient().
|
||||
*/
|
||||
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() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::post
|
||||
* @todo Implement testpost().
|
||||
*/
|
||||
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');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::put
|
||||
* @todo Implement testput().
|
||||
*/
|
||||
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() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::get
|
||||
* @todo Implement testget().
|
||||
*/
|
||||
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() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::delete
|
||||
* @todo Implement testdelete().
|
||||
*/
|
||||
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() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers RestClient::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('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() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,507 +0,0 @@
|
||||
<?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.table.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classTableTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Table
|
||||
*/
|
||||
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 Table();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('Table'); $this->assertTrue( count($methods) == 23);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::Table
|
||||
* @todo Implement testTable().
|
||||
*/
|
||||
public function testTable()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('Table', $methods ), 'exists method Table' );
|
||||
$r = new ReflectionMethod('Table', 'Table');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'objConnection');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::SetTo
|
||||
* @todo Implement testSetTo().
|
||||
*/
|
||||
public function testSetTo()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('SetTo', $methods ), 'exists method SetTo' );
|
||||
$r = new ReflectionMethod('Table', 'SetTo');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'objConnection');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::SetSource
|
||||
* @todo Implement testSetSource().
|
||||
*/
|
||||
public function testSetSource()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('SetSource', $methods ), 'exists method SetSource' );
|
||||
$r = new ReflectionMethod('Table', 'SetSource');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'stQry');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'stDefaultOrder');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'UID');
|
||||
$this->assertTrue( $params[2]->getName() == 'stDefaultOrderDir');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == 'ASC');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::GetSource
|
||||
* @todo Implement testGetSource().
|
||||
*/
|
||||
public function testGetSource()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('GetSource', $methods ), 'exists method GetSource' );
|
||||
$r = new ReflectionMethod('Table', 'GetSource');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::TotalCount
|
||||
* @todo Implement testTotalCount().
|
||||
*/
|
||||
public function testTotalCount()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('TotalCount', $methods ), 'exists method TotalCount' );
|
||||
$r = new ReflectionMethod('Table', 'TotalCount');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::Count
|
||||
* @todo Implement testCount().
|
||||
*/
|
||||
public function testCount()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('Count', $methods ), 'exists method Count' );
|
||||
$r = new ReflectionMethod('Table', 'Count');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::CurRow
|
||||
* @todo Implement testCurRow().
|
||||
*/
|
||||
public function testCurRow()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('CurRow', $methods ), 'exists method CurRow' );
|
||||
$r = new ReflectionMethod('Table', 'CurRow');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::ColumnCount
|
||||
* @todo Implement testColumnCount().
|
||||
*/
|
||||
public function testColumnCount()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('ColumnCount', $methods ), 'exists method ColumnCount' );
|
||||
$r = new ReflectionMethod('Table', 'ColumnCount');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::Read
|
||||
* @todo Implement testRead().
|
||||
*/
|
||||
public function testRead()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('Read', $methods ), 'exists method Read' );
|
||||
$r = new ReflectionMethod('Table', 'Read');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::Seek
|
||||
* @todo Implement testSeek().
|
||||
*/
|
||||
public function testSeek()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('Seek', $methods ), 'exists method Seek' );
|
||||
$r = new ReflectionMethod('Table', 'Seek');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'intPos');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '0');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::MoveFirst
|
||||
* @todo Implement testMoveFirst().
|
||||
*/
|
||||
public function testMoveFirst()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('MoveFirst', $methods ), 'exists method MoveFirst' );
|
||||
$r = new ReflectionMethod('Table', 'MoveFirst');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::EOF
|
||||
* @todo Implement testEOF().
|
||||
*/
|
||||
public function testEOF()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('EOF', $methods ), 'exists method EOF' );
|
||||
$r = new ReflectionMethod('Table', 'EOF');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::AddColumn
|
||||
* @todo Implement testAddColumn().
|
||||
*/
|
||||
public function testAddColumn()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('AddColumn', $methods ), 'exists method AddColumn' );
|
||||
$r = new ReflectionMethod('Table', 'AddColumn');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'strLabel');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'strType');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'text');
|
||||
$this->assertTrue( $params[2]->getName() == 'strName');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'strAlign');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == 'left');
|
||||
$this->assertTrue( $params[4]->getName() == 'intWidth');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '0');
|
||||
$this->assertTrue( $params[5]->getName() == 'strTarget');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == true);
|
||||
$this->assertTrue( $params[5]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[6]->getName() == 'strContent');
|
||||
$this->assertTrue( $params[6]->isArray() == false);
|
||||
$this->assertTrue( $params[6]->isOptional () == true);
|
||||
$this->assertTrue( $params[6]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::AddRawColumn
|
||||
* @todo Implement testAddRawColumn().
|
||||
*/
|
||||
public function testAddRawColumn()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('AddRawColumn', $methods ), 'exists method AddRawColumn' );
|
||||
$r = new ReflectionMethod('Table', 'AddRawColumn');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'strType');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == 'text');
|
||||
$this->assertTrue( $params[1]->getName() == 'strName');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'strAlign');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == 'left');
|
||||
$this->assertTrue( $params[3]->getName() == 'intWidth');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '0');
|
||||
$this->assertTrue( $params[4]->getName() == 'strTarget');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[5]->getName() == 'strContent');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == true);
|
||||
$this->assertTrue( $params[5]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[6]->getName() == 'strExtra');
|
||||
$this->assertTrue( $params[6]->isArray() == false);
|
||||
$this->assertTrue( $params[6]->isOptional () == true);
|
||||
$this->assertTrue( $params[6]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[7]->getName() == 'strCondition');
|
||||
$this->assertTrue( $params[7]->isArray() == false);
|
||||
$this->assertTrue( $params[7]->isOptional () == true);
|
||||
$this->assertTrue( $params[7]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[8]->getName() == 'orderByThis');
|
||||
$this->assertTrue( $params[8]->isArray() == false);
|
||||
$this->assertTrue( $params[8]->isOptional () == true);
|
||||
$this->assertTrue( $params[8]->getDefaultValue() == '1');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::RenderTitle
|
||||
* @todo Implement testRenderTitle().
|
||||
*/
|
||||
public function testRenderTitle()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('RenderTitle', $methods ), 'exists method RenderTitle' );
|
||||
$r = new ReflectionMethod('Table', 'RenderTitle');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pa');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'intPos');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '1');
|
||||
$this->assertTrue( $params[2]->getName() == 'strClass');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == 'tblHeader');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::RenderTitle_ajax
|
||||
* @todo Implement testRenderTitle_ajax().
|
||||
*/
|
||||
public function testRenderTitle_ajax()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('RenderTitle_ajax', $methods ), 'exists method RenderTitle_ajax' );
|
||||
$r = new ReflectionMethod('Table', 'RenderTitle_ajax');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pa');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'intPos');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '1');
|
||||
$this->assertTrue( $params[2]->getName() == 'strClass');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == 'tblHeader');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::RenderTitle2
|
||||
* @todo Implement testRenderTitle2().
|
||||
*/
|
||||
public function testRenderTitle2()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('RenderTitle2', $methods ), 'exists method RenderTitle2' );
|
||||
$r = new ReflectionMethod('Table', 'RenderTitle2');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pa');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'fil');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'intPos');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'strClass');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == 'tblHeader');
|
||||
$this->assertTrue( $params[4]->getName() == 'auxgetval');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::RenderColumn
|
||||
* @todo Implement testRenderColumn().
|
||||
*/
|
||||
public function testRenderColumn()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('RenderColumn', $methods ), 'exists method RenderColumn' );
|
||||
$r = new ReflectionMethod('Table', 'RenderColumn');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'intPos');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '0');
|
||||
$this->assertTrue( $params[1]->getName() == 'strClass');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'tblCell');
|
||||
$this->assertTrue( $params[2]->getName() == 'strClassLink');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == 'tblCellA');
|
||||
$this->assertTrue( $params[3]->getName() == 'number');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '0');
|
||||
$this->assertTrue( $params[4]->getName() == 'renderTD');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '1');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::SetAction
|
||||
* @todo Implement testSetAction().
|
||||
*/
|
||||
public function testSetAction()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('SetAction', $methods ), 'exists method SetAction' );
|
||||
$r = new ReflectionMethod('Table', 'SetAction');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'strAction');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'strLabel');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'Continue');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::setTranslate
|
||||
* @todo Implement testsetTranslate().
|
||||
*/
|
||||
public function testsetTranslate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setTranslate', $methods ), 'exists method setTranslate' );
|
||||
$r = new ReflectionMethod('Table', 'setTranslate');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'contexto');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'tabla');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'nombre');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::translateValue
|
||||
* @todo Implement testtranslateValue().
|
||||
*/
|
||||
public function testtranslateValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('translateValue', $methods ), 'exists method translateValue' );
|
||||
$r = new ReflectionMethod('Table', 'translateValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'contexto');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'valor');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'lang');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::setContext
|
||||
* @todo Implement testsetContext().
|
||||
*/
|
||||
public function testsetContext()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setContext', $methods ), 'exists method setContext' );
|
||||
$r = new ReflectionMethod('Table', 'setContext');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'contexto');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Table::ParsingFromHtml
|
||||
* @todo Implement testParsingFromHtml().
|
||||
*/
|
||||
public function testParsingFromHtml()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('ParsingFromHtml', $methods ), 'exists method ParsingFromHtml' );
|
||||
$r = new ReflectionMethod('Table', 'ParsingFromHtml');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'number');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '100000000');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,181 +0,0 @@
|
||||
<?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.templatePower.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classTemplatePowerParserTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var TemplatePowerParser
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$tpl_file='';
|
||||
$type='';
|
||||
$this->object = new TemplatePowerParser($tpl_file, $type);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('TemplatePowerParser'); $this->assertTrue( count($methods) == 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePowerParser::TemplatePowerParser
|
||||
* @todo Implement testTemplatePowerParser().
|
||||
*/
|
||||
public function testTemplatePowerParser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('TemplatePowerParser', $methods ), 'exists method TemplatePowerParser' );
|
||||
$r = new ReflectionMethod('TemplatePowerParser', 'TemplatePowerParser');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'tpl_file');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'type');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePowerParser::__errorAlert
|
||||
* @todo Implement test__errorAlert().
|
||||
*/
|
||||
public function test__errorAlert()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__errorAlert', $methods ), 'exists method __errorAlert' );
|
||||
$r = new ReflectionMethod('TemplatePowerParser', '__errorAlert');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'message');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePowerParser::__prepare
|
||||
* @todo Implement test__prepare().
|
||||
*/
|
||||
public function test__prepare()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__prepare', $methods ), 'exists method __prepare' );
|
||||
$r = new ReflectionMethod('TemplatePowerParser', '__prepare');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePowerParser::__cleanUp
|
||||
* @todo Implement test__cleanUp().
|
||||
*/
|
||||
public function test__cleanUp()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__cleanUp', $methods ), 'exists method __cleanUp' );
|
||||
$r = new ReflectionMethod('TemplatePowerParser', '__cleanUp');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePowerParser::__prepareTemplate
|
||||
* @todo Implement test__prepareTemplate().
|
||||
*/
|
||||
public function test__prepareTemplate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__prepareTemplate', $methods ), 'exists method __prepareTemplate' );
|
||||
$r = new ReflectionMethod('TemplatePowerParser', '__prepareTemplate');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'tpl_file');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'type');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePowerParser::__parseTemplate
|
||||
* @todo Implement test__parseTemplate().
|
||||
*/
|
||||
public function test__parseTemplate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__parseTemplate', $methods ), 'exists method __parseTemplate' );
|
||||
$r = new ReflectionMethod('TemplatePowerParser', '__parseTemplate');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'tplvar');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'blockname');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'initdev');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePowerParser::version
|
||||
* @todo Implement testversion().
|
||||
*/
|
||||
public function testversion()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('version', $methods ), 'exists method version' );
|
||||
$r = new ReflectionMethod('TemplatePowerParser', 'version');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePowerParser::assignInclude
|
||||
* @todo Implement testassignInclude().
|
||||
*/
|
||||
public function testassignInclude()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('assignInclude', $methods ), 'exists method assignInclude' );
|
||||
$r = new ReflectionMethod('TemplatePowerParser', 'assignInclude');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'iblockname');
|
||||
$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);
|
||||
$this->assertTrue( $params[2]->getName() == 'type');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '0');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,309 +0,0 @@
|
||||
<?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.templatePower.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classTemplatePowerTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var TemplatePower
|
||||
*/
|
||||
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 TemplatePower();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('TemplatePower'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePower::TemplatePower
|
||||
* @todo Implement testTemplatePower().
|
||||
*/
|
||||
public function testTemplatePower()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('TemplatePower', $methods ), 'exists method TemplatePower' );
|
||||
$r = new ReflectionMethod('TemplatePower', 'TemplatePower');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'tpl_file');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'type');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '0');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePower::__deSerializeTPL
|
||||
* @todo Implement test__deSerializeTPL().
|
||||
*/
|
||||
public function test__deSerializeTPL()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__deSerializeTPL', $methods ), 'exists method __deSerializeTPL' );
|
||||
$r = new ReflectionMethod('TemplatePower', '__deSerializeTPL');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'stpl_file');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'type');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePower::__makeContentRoot
|
||||
* @todo Implement test__makeContentRoot().
|
||||
*/
|
||||
public function test__makeContentRoot()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__makeContentRoot', $methods ), 'exists method __makeContentRoot' );
|
||||
$r = new ReflectionMethod('TemplatePower', '__makeContentRoot');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePower::__assign
|
||||
* @todo Implement test__assign().
|
||||
*/
|
||||
public function test__assign()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__assign', $methods ), 'exists method __assign' );
|
||||
$r = new ReflectionMethod('TemplatePower', '__assign');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'varname');
|
||||
$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 TemplatePower::__assignGlobal
|
||||
* @todo Implement test__assignGlobal().
|
||||
*/
|
||||
public function test__assignGlobal()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__assignGlobal', $methods ), 'exists method __assignGlobal' );
|
||||
$r = new ReflectionMethod('TemplatePower', '__assignGlobal');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'varname');
|
||||
$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 TemplatePower::__outputContent
|
||||
* @todo Implement test__outputContent().
|
||||
*/
|
||||
public function test__outputContent()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__outputContent', $methods ), 'exists method __outputContent' );
|
||||
$r = new ReflectionMethod('TemplatePower', '__outputContent');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'blockname');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePower::__printVars
|
||||
* @todo Implement test__printVars().
|
||||
*/
|
||||
public function test__printVars()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__printVars', $methods ), 'exists method __printVars' );
|
||||
$r = new ReflectionMethod('TemplatePower', '__printVars');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePower::serializedBase
|
||||
* @todo Implement testserializedBase().
|
||||
*/
|
||||
public function testserializedBase()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('serializedBase', $methods ), 'exists method serializedBase' );
|
||||
$r = new ReflectionMethod('TemplatePower', 'serializedBase');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePower::showUnAssigned
|
||||
* @todo Implement testshowUnAssigned().
|
||||
*/
|
||||
public function testshowUnAssigned()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('showUnAssigned', $methods ), 'exists method showUnAssigned' );
|
||||
$r = new ReflectionMethod('TemplatePower', 'showUnAssigned');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'state');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '1');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePower::prepare
|
||||
* @todo Implement testprepare().
|
||||
*/
|
||||
public function testprepare()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('prepare', $methods ), 'exists method prepare' );
|
||||
$r = new ReflectionMethod('TemplatePower', 'prepare');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePower::newBlock
|
||||
* @todo Implement testnewBlock().
|
||||
*/
|
||||
public function testnewBlock()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('newBlock', $methods ), 'exists method newBlock' );
|
||||
$r = new ReflectionMethod('TemplatePower', 'newBlock');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'blockname');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePower::assignGlobal
|
||||
* @todo Implement testassignGlobal().
|
||||
*/
|
||||
public function testassignGlobal()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('assignGlobal', $methods ), 'exists method assignGlobal' );
|
||||
$r = new ReflectionMethod('TemplatePower', 'assignGlobal');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'varname');
|
||||
$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 () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePower::assign
|
||||
* @todo Implement testassign().
|
||||
*/
|
||||
public function testassign()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('assign', $methods ), 'exists method assign' );
|
||||
$r = new ReflectionMethod('TemplatePower', 'assign');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'varname');
|
||||
$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 () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePower::gotoBlock
|
||||
* @todo Implement testgotoBlock().
|
||||
*/
|
||||
public function testgotoBlock()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('gotoBlock', $methods ), 'exists method gotoBlock' );
|
||||
$r = new ReflectionMethod('TemplatePower', 'gotoBlock');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'blockname');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePower::getVarValue
|
||||
* @todo Implement testgetVarValue().
|
||||
*/
|
||||
public function testgetVarValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getVarValue', $methods ), 'exists method getVarValue' );
|
||||
$r = new ReflectionMethod('TemplatePower', 'getVarValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'varname');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePower::printToScreen
|
||||
* @todo Implement testprintToScreen().
|
||||
*/
|
||||
public function testprintToScreen()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printToScreen', $methods ), 'exists method printToScreen' );
|
||||
$r = new ReflectionMethod('TemplatePower', 'printToScreen');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers TemplatePower::getOutputContent
|
||||
* @todo Implement testgetOutputContent().
|
||||
*/
|
||||
public function testgetOutputContent()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getOutputContent', $methods ), 'exists method getOutputContent' );
|
||||
$r = new ReflectionMethod('TemplatePower', 'getOutputContent');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,135 +0,0 @@
|
||||
<?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.tree.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classTreeTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Tree
|
||||
*/
|
||||
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 Tree();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('Tree'); $this->assertTrue( count($methods) == 14);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Tree::Tree
|
||||
* @todo Implement testTree().
|
||||
*/
|
||||
public function testTree()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('Tree', $methods ), 'exists method Tree' );
|
||||
$r = new ReflectionMethod('Tree', 'Tree');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'xmlnode');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Tree::addChild
|
||||
* @todo Implement testaddChild().
|
||||
*/
|
||||
public function testaddChild()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addChild', $methods ), 'exists method addChild' );
|
||||
$r = new ReflectionMethod('Tree', 'addChild');
|
||||
$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() == 'label');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'attributes');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == Array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Tree::printPlus
|
||||
* @todo Implement testprintPlus().
|
||||
*/
|
||||
public function testprintPlus()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printPlus', $methods ), 'exists method printPlus' );
|
||||
$r = new ReflectionMethod('Tree', 'printPlus');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Tree::printLabel
|
||||
* @todo Implement testprintLabel().
|
||||
*/
|
||||
public function testprintLabel()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printLabel', $methods ), 'exists method printLabel' );
|
||||
$r = new ReflectionMethod('Tree', 'printLabel');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Tree::printContent
|
||||
* @todo Implement testprintContent().
|
||||
*/
|
||||
public function testprintContent()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printContent', $methods ), 'exists method printContent' );
|
||||
$r = new ReflectionMethod('Tree', 'printContent');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Tree::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('Tree', 'render');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlFormTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm
|
||||
*/
|
||||
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 XmlForm();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm'); $this->assertTrue( count($methods) == 4);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm::parseFile
|
||||
* @todo Implement testparseFile().
|
||||
*/
|
||||
public function testparseFile()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('parseFile', $methods ), 'exists method parseFile' );
|
||||
$r = new ReflectionMethod('XmlForm', 'parseFile');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'filename');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'language');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'forceParse');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm::setValues
|
||||
* @todo Implement testsetValues().
|
||||
*/
|
||||
public function testsetValues()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setValues', $methods ), 'exists method setValues' );
|
||||
$r = new ReflectionMethod('XmlForm', 'setValues');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'newValues');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == Array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'template');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'scriptContent');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm::cloneObject
|
||||
* @todo Implement testcloneObject().
|
||||
*/
|
||||
public function testcloneObject()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('cloneObject', $methods ), 'exists method cloneObject' );
|
||||
$r = new ReflectionMethod('XmlForm', 'cloneObject');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,460 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::XmlForm_Field
|
||||
* @todo Implement testXmlForm_Field().
|
||||
*/
|
||||
public function testXmlForm_Field()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('XmlForm_Field', $methods ), 'exists method XmlForm_Field' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'XmlForm_Field');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'xmlNode');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'lang');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'en');
|
||||
$this->assertTrue( $params[2]->getName() == 'home');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'owner');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::validateValue
|
||||
* @todo Implement testvalidateValue().
|
||||
*/
|
||||
public function testvalidateValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'validateValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::executeSQL
|
||||
* @todo Implement testexecuteSQL().
|
||||
*/
|
||||
public function testexecuteSQL()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('executeSQL', $methods ), 'exists method executeSQL' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'executeSQL');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'owner');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'row');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '-1');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::htmlentities
|
||||
* @todo Implement testhtmlentities().
|
||||
*/
|
||||
public function testhtmlentities()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('htmlentities', $methods ), 'exists method htmlentities' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'htmlentities');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'flags');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '3');
|
||||
$this->assertTrue( $params[2]->getName() == 'encoding');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == 'utf-8');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'onlyValue');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'therow');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '-1');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::renderTable
|
||||
* @todo Implement testrenderTable().
|
||||
*/
|
||||
public function testrenderTable()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderTable', $methods ), 'exists method renderTable' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'renderTable');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'onlyValue');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::dependentOf
|
||||
* @todo Implement testdependentOf().
|
||||
*/
|
||||
public function testdependentOf()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('dependentOf', $methods ), 'exists method dependentOf' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'dependentOf');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::mask
|
||||
* @todo Implement testmask().
|
||||
*/
|
||||
public function testmask()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('mask', $methods ), 'exists method mask' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'mask');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'format');
|
||||
$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 XmlForm_Field::getAttributes
|
||||
* @todo Implement testgetAttributes().
|
||||
*/
|
||||
public function testgetAttributes()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAttributes', $methods ), 'exists method getAttributes' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'getAttributes');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::getEvents
|
||||
* @todo Implement testgetEvents().
|
||||
*/
|
||||
public function testgetEvents()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getEvents', $methods ), 'exists method getEvents' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'getEvents');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::attachEvents
|
||||
* @todo Implement testattachEvents().
|
||||
*/
|
||||
public function testattachEvents()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('attachEvents', $methods ), 'exists method attachEvents' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'attachEvents');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'elementRef');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::createXmlNode
|
||||
* @todo Implement testcreateXmlNode().
|
||||
*/
|
||||
public function testcreateXmlNode()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('createXmlNode', $methods ), 'exists method createXmlNode' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'createXmlNode');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'includeDefaultValues');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::updateXmlNode
|
||||
* @todo Implement testupdateXmlNode().
|
||||
*/
|
||||
public function testupdateXmlNode()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('updateXmlNode', $methods ), 'exists method updateXmlNode' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'updateXmlNode');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'node');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'includeDefaultValues');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::getXmlAttributes
|
||||
* @todo Implement testgetXmlAttributes().
|
||||
*/
|
||||
public function testgetXmlAttributes()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getXmlAttributes', $methods ), 'exists method getXmlAttributes' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'getXmlAttributes');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'includeDefaultValues');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::maskValue
|
||||
* @todo Implement testmaskValue().
|
||||
*/
|
||||
public function testmaskValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('maskValue', $methods ), 'exists method maskValue' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'maskValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::cloneObject
|
||||
* @todo Implement testcloneObject().
|
||||
*/
|
||||
public function testcloneObject()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('cloneObject', $methods ), 'exists method cloneObject' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'cloneObject');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::getPMTableValue
|
||||
* @todo Implement testgetPMTableValue().
|
||||
*/
|
||||
public function testgetPMTableValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getPMTableValue', $methods ), 'exists method getPMTableValue' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'getPMTableValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'oOwner');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::NSRequiredValue
|
||||
* @todo Implement testNSRequiredValue().
|
||||
*/
|
||||
public function testNSRequiredValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('NSRequiredValue', $methods ), 'exists method NSRequiredValue' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'NSRequiredValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'show');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::NSGridLabel
|
||||
* @todo Implement testNSGridLabel().
|
||||
*/
|
||||
public function testNSGridLabel()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('NSGridLabel', $methods ), 'exists method NSGridLabel' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'NSGridLabel');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'show');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::NSDefaultValue
|
||||
* @todo Implement testNSDefaultValue().
|
||||
*/
|
||||
public function testNSDefaultValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('NSDefaultValue', $methods ), 'exists method NSDefaultValue' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'NSDefaultValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'show');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::NSGridType
|
||||
* @todo Implement testNSGridType().
|
||||
*/
|
||||
public function testNSGridType()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('NSGridType', $methods ), 'exists method NSGridType' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'NSGridType');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'show');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::NSDependentFields
|
||||
* @todo Implement testNSDependentFields().
|
||||
*/
|
||||
public function testNSDependentFields()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('NSDependentFields', $methods ), 'exists method NSDependentFields' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'NSDependentFields');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'show');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field::renderHint
|
||||
* @todo Implement testrenderHint().
|
||||
*/
|
||||
public function testrenderHint()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderHint', $methods ), 'exists method renderHint' );
|
||||
$r = new ReflectionMethod('XmlForm_Field', 'renderHint');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_ButtonTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Button
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Button($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Button'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Button::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Button', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_CaptionCurrencyTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_CaptionCurrency
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_CaptionCurrency($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_CaptionCurrency'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_CaptionCurrency::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_CaptionCurrency', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_CaptionPercentageTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_CaptionPercentage
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_CaptionPercentage($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_CaptionPercentage'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_CaptionPercentage::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_CaptionPercentage', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_CaptionTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Caption
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Caption($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Caption'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Caption::validateValue
|
||||
* @todo Implement testvalidateValue().
|
||||
*/
|
||||
public function testvalidateValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Caption', 'validateValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Caption::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Caption', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'rowId');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'onlyValue');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'row');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '-1');
|
||||
$this->assertTrue( $params[5]->getName() == 'therow');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == true);
|
||||
$this->assertTrue( $params[5]->getDefaultValue() == '-1');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_CheckGroupTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_CheckGroup
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_CheckGroup($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_CheckGroup'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_CheckGroup::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_CheckGroup', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_CheckGroupViewTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_CheckGroupView
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_CheckGroupView($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_CheckGroupView'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_CheckGroupView::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_CheckGroupView', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_Checkbox2Test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Checkbox2
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Checkbox2($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Checkbox2'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Checkbox2::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Checkbox2', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_CheckboxTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Checkbox
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Checkbox($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Checkbox'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Checkbox::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Checkbox', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Checkbox::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Checkbox', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Checkbox::maskValue
|
||||
* @todo Implement testmaskValue().
|
||||
*/
|
||||
public function testmaskValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('maskValue', $methods ), 'exists method maskValue' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Checkbox', 'maskValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_CheckboxptTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Checkboxpt
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Checkboxpt($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Checkboxpt'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Checkboxpt::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Checkboxpt', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Checkboxpt::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Checkboxpt', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Checkboxpt::maskValue
|
||||
* @todo Implement testmaskValue().
|
||||
*/
|
||||
public function testmaskValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('maskValue', $methods ), 'exists method maskValue' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Checkboxpt', 'maskValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_CurrencyTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Currency
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Currency($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Currency'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Currency::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Currency', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Currency::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Currency', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
<?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.xmlformExtension.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_DVEditorTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_DVEditor
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_DVEditor($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_DVEditor'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_DVEditor::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_DVEditor', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_DVEditor::attachEvents
|
||||
* @todo Implement testattachEvents().
|
||||
*/
|
||||
public function testattachEvents()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('attachEvents', $methods ), 'exists method attachEvents' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_DVEditor', 'attachEvents');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'element');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,143 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_Date2Test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Date2
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Date2($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Date2'); $this->assertTrue( count($methods) == 28);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date2::verifyDateFormat
|
||||
* @todo Implement testverifyDateFormat().
|
||||
*/
|
||||
public function testverifyDateFormat()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('verifyDateFormat', $methods ), 'exists method verifyDateFormat' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date2', 'verifyDateFormat');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'date');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date2::isvalidBeforeFormat
|
||||
* @todo Implement testisvalidBeforeFormat().
|
||||
*/
|
||||
public function testisvalidBeforeFormat()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('isvalidBeforeFormat', $methods ), 'exists method isvalidBeforeFormat' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date2', 'isvalidBeforeFormat');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'date');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date2::calculateBeforeFormat
|
||||
* @todo Implement testcalculateBeforeFormat().
|
||||
*/
|
||||
public function testcalculateBeforeFormat()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('calculateBeforeFormat', $methods ), 'exists method calculateBeforeFormat' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date2', 'calculateBeforeFormat');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'date');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sign');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date2::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date2', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date2::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date2', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'onlyValue');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,187 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_Date5Test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Date5
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Date5($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Date5'); $this->assertTrue( count($methods) == 30);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date5::verifyDateFormat
|
||||
* @todo Implement testverifyDateFormat().
|
||||
*/
|
||||
public function testverifyDateFormat()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('verifyDateFormat', $methods ), 'exists method verifyDateFormat' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date5', 'verifyDateFormat');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'date');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'mask');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date5::isvalidBeforeFormat
|
||||
* @todo Implement testisvalidBeforeFormat().
|
||||
*/
|
||||
public function testisvalidBeforeFormat()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('isvalidBeforeFormat', $methods ), 'exists method isvalidBeforeFormat' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date5', 'isvalidBeforeFormat');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'date');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date5::calculateBeforeFormat
|
||||
* @todo Implement testcalculateBeforeFormat().
|
||||
*/
|
||||
public function testcalculateBeforeFormat()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('calculateBeforeFormat', $methods ), 'exists method calculateBeforeFormat' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date5', 'calculateBeforeFormat');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'date');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sign');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date5::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date5', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date5::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date5', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'onlyValue');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date5::__draw_widget
|
||||
* @todo Implement test__draw_widget().
|
||||
*/
|
||||
public function test__draw_widget()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__draw_widget', $methods ), 'exists method __draw_widget' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date5', '__draw_widget');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pID');
|
||||
$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);
|
||||
$this->assertTrue( $params[2]->getName() == 'owner');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date5::getSplitDate
|
||||
* @todo Implement testgetSplitDate().
|
||||
*/
|
||||
public function testgetSplitDate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getSplitDate', $methods ), 'exists method getSplitDate' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date5', 'getSplitDate');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'date');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'mask');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,165 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_DateTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Date
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Date($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Date'); $this->assertTrue( count($methods) == 29);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date::verifyDateFormat
|
||||
* @todo Implement testverifyDateFormat().
|
||||
*/
|
||||
public function testverifyDateFormat()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('verifyDateFormat', $methods ), 'exists method verifyDateFormat' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date', 'verifyDateFormat');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'date');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date::isvalidBeforeFormat
|
||||
* @todo Implement testisvalidBeforeFormat().
|
||||
*/
|
||||
public function testisvalidBeforeFormat()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('isvalidBeforeFormat', $methods ), 'exists method isvalidBeforeFormat' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date', 'isvalidBeforeFormat');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'date');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date::calculateBeforeFormat
|
||||
* @todo Implement testcalculateBeforeFormat().
|
||||
*/
|
||||
public function testcalculateBeforeFormat()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('calculateBeforeFormat', $methods ), 'exists method calculateBeforeFormat' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date', 'calculateBeforeFormat');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'date');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sign');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'onlyValue');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Date::__draw_widget
|
||||
* @todo Implement test__draw_widget().
|
||||
*/
|
||||
public function test__draw_widget()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__draw_widget', $methods ), 'exists method __draw_widget' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Date', '__draw_widget');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pID');
|
||||
$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);
|
||||
$this->assertTrue( $params[2]->getName() == 'owner');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_DateViewTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_DateView
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_DateView($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_DateView'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_DateView::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_DateView', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,133 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_DropdownTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Dropdown
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Dropdown($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Dropdown'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Dropdown::validateValue
|
||||
* @todo Implement testvalidateValue().
|
||||
*/
|
||||
public function testvalidateValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Dropdown', 'validateValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Dropdown::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Dropdown', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'rowId');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'onlyValue');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'row');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '-1');
|
||||
$this->assertTrue( $params[5]->getName() == 'therow');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == true);
|
||||
$this->assertTrue( $params[5]->getDefaultValue() == '-1');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Dropdown::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Dropdown', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'onlyValue');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'therow');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '-1');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_DropdownptTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Dropdownpt
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Dropdownpt($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Dropdownpt'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Dropdownpt::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Dropdownpt', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Dropdownpt::maskValue
|
||||
* @todo Implement testmaskValue().
|
||||
*/
|
||||
public function testmaskValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('maskValue', $methods ), 'exists method maskValue' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Dropdownpt', 'maskValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
<?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.xmlformExtension.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_FastSearchTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_FastSearch
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_FastSearch($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_FastSearch'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_FileTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_File
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_File($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_File'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_File::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_File', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,147 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_GridTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Grid
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Grid($fieldNode,'param', 'param');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Grid'); $this->assertTrue( count($methods) == 28);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Grid::XmlForm_Field_Grid
|
||||
* @todo Implement testXmlForm_Field_Grid().
|
||||
*/
|
||||
public function testXmlForm_Field_Grid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('XmlForm_Field_Grid', $methods ), 'exists method XmlForm_Field_Grid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Grid', 'XmlForm_Field_Grid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'xmlnode');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'language');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'home');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Grid::parseFile
|
||||
* @todo Implement testparseFile().
|
||||
*/
|
||||
public function testparseFile()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('parseFile', $methods ), 'exists method parseFile' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Grid', 'parseFile');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'home');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'language');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Grid::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Grid', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Grid::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Grid', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'therow');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '-1');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Grid::flipValues
|
||||
* @todo Implement testflipValues().
|
||||
*/
|
||||
public function testflipValues()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('flipValues', $methods ), 'exists method flipValues' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Grid', 'flipValues');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'arrayData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_HiddenTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Hidden
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Hidden($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Hidden'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Hidden::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Hidden', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Hidden::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Hidden', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Hidden::renderTable
|
||||
* @todo Implement testrenderTable().
|
||||
*/
|
||||
public function testrenderTable()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderTable', $methods ), 'exists method renderTable' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Hidden', 'renderTable');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,70 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_ImageTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Image
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Image($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Image'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Image::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Image', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,127 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_JavaScriptTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_JavaScript
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_JavaScript($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_JavaScript'); $this->assertTrue( count($methods) == 26);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_JavaScript::XmlForm_Field_JavaScript
|
||||
* @todo Implement testXmlForm_Field_JavaScript().
|
||||
*/
|
||||
public function testXmlForm_Field_JavaScript()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('XmlForm_Field_JavaScript', $methods ), 'exists method XmlForm_Field_JavaScript' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_JavaScript', 'XmlForm_Field_JavaScript');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'xmlNode');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'lang');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'en');
|
||||
$this->assertTrue( $params[2]->getName() == 'home');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_JavaScript::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_JavaScript', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_JavaScript::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_JavaScript', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_JavaScript::validateValue
|
||||
* @todo Implement testvalidateValue().
|
||||
*/
|
||||
public function testvalidateValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_JavaScript', 'validateValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
<?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.xmlformExtension.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_LabelTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Label
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Label($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Label'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,123 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_LinkTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Link
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Link($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Link'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Link::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Link', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == null);
|
||||
$this->assertTrue( $params[1]->getName() == 'label');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == null);
|
||||
$this->assertTrue( $params[2]->getName() == 'owner');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == null);
|
||||
$this->assertTrue( $params[3]->getName() == 'row');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == -1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Link::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Link', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == array());
|
||||
$this->assertTrue( $params[1]->getName() == 'label');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == array());
|
||||
$this->assertTrue( $params[2]->getName() == 'owner');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Link::renderTable
|
||||
* @todo Implement testrenderTable().
|
||||
*/
|
||||
public function testrenderTable()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderTable', $methods ), 'exists method renderTable' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Link', 'renderTable');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,109 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_ListboxTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Listbox
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Listbox($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Listbox'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Listbox::validateValue
|
||||
* @todo Implement testvalidateValue().
|
||||
*/
|
||||
public function testvalidateValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Listbox', 'validateValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Listbox::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Listbox', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Listbox::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Listbox', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_PasswordTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Password
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Password($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Password'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Password::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Password', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_PercentageTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Percentage
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Percentage($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Percentage'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Percentage::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Percentage', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_PrintTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Print
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Print($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Print'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Print::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Print', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_RadioGroupTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_RadioGroup
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_RadioGroup($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_RadioGroup'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_RadioGroup::validateValue
|
||||
* @todo Implement testvalidateValue().
|
||||
*/
|
||||
public function testvalidateValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_RadioGroup', 'validateValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_RadioGroup::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_RadioGroup', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_RadioGroupViewTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_RadioGroupView
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_RadioGroupView($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_RadioGroupView'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_RadioGroupView::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_RadioGroupView', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_ResetTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Reset
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Reset($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Reset'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Reset::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Reset', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_SimpleTextTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_SimpleText
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_SimpleText($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_SimpleText'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_SimpleText::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_SimpleText', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_SimpleText::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_SimpleText', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_SubmitTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Submit
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Submit($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Submit'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Submit::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Submit', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_SubtitleTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Subtitle
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Subtitle($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Subtitle'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Subtitle::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Subtitle', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Subtitle::validateValue
|
||||
* @todo Implement testvalidateValue().
|
||||
*/
|
||||
public function testvalidateValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Subtitle', 'validateValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_SuggestTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Suggest
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Suggest($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Suggest'); $this->assertTrue( count($methods) == 26);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Suggest::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Suggest', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Suggest::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Suggest', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Suggest::renderTable
|
||||
* @todo Implement testrenderTable().
|
||||
*/
|
||||
public function testrenderTable()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderTable', $methods ), 'exists method renderTable' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Suggest', 'renderTable');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_TextTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Text
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Text($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Text'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Text::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Text', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Text::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Text', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Text::renderTable
|
||||
* @todo Implement testrenderTable().
|
||||
*/
|
||||
public function testrenderTable()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderTable', $methods ), 'exists method renderTable' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Text', 'renderTable');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_TextareaTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Textarea
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Textarea($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Textarea'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Textarea::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Textarea', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Textarea::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Textarea', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_TitleTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Title
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Title($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Title'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Title::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Title', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Title::validateValue
|
||||
* @todo Implement testvalidateValue().
|
||||
*/
|
||||
public function testvalidateValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('validateValue', $methods ), 'exists method validateValue' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Title', 'validateValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
<?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.xmlMenu.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_XmlMenuTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_XmlMenu
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_XmlMenu($fieldNode,'lang','home','owner');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_XmlMenu'); $this->assertTrue( count($methods) == 26);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_XmlMenu::XmlForm_Field_XmlMenu
|
||||
* @todo Implement testXmlForm_Field_XmlMenu().
|
||||
*/
|
||||
public function testXmlForm_Field_XmlMenu()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('XmlForm_Field_XmlMenu', $methods ), 'exists method XmlForm_Field_XmlMenu' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_XmlMenu', 'XmlForm_Field_XmlMenu');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'xmlNode');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'lang');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getName() == 'home');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getName() == 'owner');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_XmlMenu::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_XmlMenu', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_XmlMenu::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_XmlMenu', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_XmlformTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_Xmlform
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$file = PATH_TRUNK . 'workflow/engine/xmlform/login/login';
|
||||
$this->object = new XmlForm_Field_Xmlform($fieldNode,'lang',$file,'owner');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_Xmlform'); $this->assertTrue( count($methods) == 27);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Xmlform::XmlForm_Field_Xmlform
|
||||
* @todo Implement testXmlForm_Field_Xmlform().
|
||||
*/
|
||||
public function testXmlForm_Field_Xmlform()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('XmlForm_Field_Xmlform', $methods ), 'exists method XmlForm_Field_Xmlform' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Xmlform', 'XmlForm_Field_Xmlform');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'xmlnode');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'language');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'home');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Xmlform::parseFile
|
||||
* @todo Implement testparseFile().
|
||||
*/
|
||||
public function testparseFile()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('parseFile', $methods ), 'exists method parseFile' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Xmlform', 'parseFile');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'home');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'language');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_Xmlform::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_Xmlform', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,89 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_YesNoTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_YesNo
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_YesNo($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_YesNo'); $this->assertTrue( count($methods) == 25);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_YesNo::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_YesNo', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_YesNo::renderGrid
|
||||
* @todo Implement testrenderGrid().
|
||||
*/
|
||||
public function testrenderGrid()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderGrid', $methods ), 'exists method renderGrid' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_YesNo', 'renderGrid');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
<?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.xmlformExtension.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXmlForm_Field_cellMarkTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XmlForm_Field_cellMark
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_cellMark($fieldNode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('XmlForm_Field_cellMark'); $this->assertTrue( count($methods) == 27);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_cellMark::tdStyle
|
||||
* @todo Implement testtdStyle().
|
||||
*/
|
||||
public function testtdStyle()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('tdStyle', $methods ), 'exists method tdStyle' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_cellMark', 'tdStyle');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XmlForm_Field_cellMark::tdClass
|
||||
* @todo Implement testtdClass().
|
||||
*/
|
||||
public function testtdClass()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('tdClass', $methods ), 'exists method tdClass' );
|
||||
$r = new ReflectionMethod('XmlForm_Field_cellMark', 'tdClass');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'values');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,178 +0,0 @@
|
||||
<?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.xmlDocument.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXml_NodeTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Xml_Node
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$name = '';
|
||||
$type = '';
|
||||
$value = '';
|
||||
$attributes = array();
|
||||
$this->object = new Xml_Node($name, $type, $value, $attributes = array());
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('Xml_Node'); $this->assertTrue( count($methods) == 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Xml_Node::Xml_Node
|
||||
* @todo Implement testXml_Node().
|
||||
*/
|
||||
public function testXml_Node()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('Xml_Node', $methods ), 'exists method Xml_Node' );
|
||||
$r = new ReflectionMethod('Xml_Node', 'Xml_Node');
|
||||
$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() == 'type');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'value');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'attributes');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Xml_Node::addAttribute
|
||||
* @todo Implement testaddAttribute().
|
||||
*/
|
||||
public function testaddAttribute()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addAttribute', $methods ), 'exists method addAttribute' );
|
||||
$r = new ReflectionMethod('Xml_Node', 'addAttribute');
|
||||
$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 Xml_Node::addChildNode
|
||||
* @todo Implement testaddChildNode().
|
||||
*/
|
||||
public function testaddChildNode()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addChildNode', $methods ), 'exists method addChildNode' );
|
||||
$r = new ReflectionMethod('Xml_Node', 'addChildNode');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'childNode');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Xml_Node::toTree
|
||||
* @todo Implement testtoTree().
|
||||
*/
|
||||
public function testtoTree()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('toTree', $methods ), 'exists method toTree' );
|
||||
$r = new ReflectionMethod('Xml_Node', 'toTree');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Xml_Node::toArray
|
||||
* @todo Implement testtoArray().
|
||||
*/
|
||||
public function testtoArray()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('toArray', $methods ), 'exists method toArray' );
|
||||
$r = new ReflectionMethod('Xml_Node', 'toArray');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'obj');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Xml_Node::findNode
|
||||
* @todo Implement testfindNode().
|
||||
*/
|
||||
public function testfindNode()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('findNode', $methods ), 'exists method findNode' );
|
||||
$r = new ReflectionMethod('Xml_Node', 'findNode');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'xpath');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Xml_Node::getXML
|
||||
* @todo Implement testgetXML().
|
||||
*/
|
||||
public function testgetXML()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getXML', $methods ), 'exists method getXML' );
|
||||
$r = new ReflectionMethod('Xml_Node', 'getXML');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Xml_Node::getCDATAValue
|
||||
* @todo Implement testgetCDATAValue().
|
||||
*/
|
||||
public function testgetCDATAValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getCDATAValue', $methods ), 'exists method getCDATAValue' );
|
||||
$r = new ReflectionMethod('Xml_Node', 'getCDATAValue');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
<?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.xmlDocument.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classXml_documentTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Xml_document
|
||||
*/
|
||||
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 Xml_document();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('Xml_document'); $this->assertTrue( count($methods) == 11);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Xml_document::Xml_document
|
||||
* @todo Implement testXml_document().
|
||||
*/
|
||||
public function testXml_document()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('Xml_document', $methods ), 'exists method Xml_document' );
|
||||
$r = new ReflectionMethod('Xml_document', 'Xml_document');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Xml_document::parseXmlFile
|
||||
* @todo Implement testparseXmlFile().
|
||||
*/
|
||||
public function testparseXmlFile()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('parseXmlFile', $methods ), 'exists method parseXmlFile' );
|
||||
$r = new ReflectionMethod('Xml_document', 'parseXmlFile');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'filename');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'content');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Xml_document::findNode
|
||||
* @todo Implement testfindNode().
|
||||
*/
|
||||
public function testfindNode()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('findNode', $methods ), 'exists method findNode' );
|
||||
$r = new ReflectionMethod('Xml_document', 'findNode');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'xpath');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Xml_document::getXML
|
||||
* @todo Implement testgetXML().
|
||||
*/
|
||||
public function testgetXML()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getXML', $methods ), 'exists method getXML' );
|
||||
$r = new ReflectionMethod('Xml_document', 'getXML');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Xml_document::save
|
||||
* @todo Implement testsave().
|
||||
*/
|
||||
public function testsave()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('save', $methods ), 'exists method save' );
|
||||
$r = new ReflectionMethod('Xml_document', 'save');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'filename');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,201 +0,0 @@
|
||||
<?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.database_base.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
||||
*/
|
||||
|
||||
class classdatabase_baseTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var database_base
|
||||
*/
|
||||
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 database_base();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('database_base'); $this->assertTrue( count($methods) == 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers database_base::__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('database_base', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sType');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == DB_ADAPTER);
|
||||
$this->assertTrue( $params[1]->getName() == 'sServer');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == DB_HOST);
|
||||
$this->assertTrue( $params[2]->getName() == 'sUser');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == DB_USER);
|
||||
$this->assertTrue( $params[3]->getName() == 'sPass');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == DB_PASS);
|
||||
$this->assertTrue( $params[4]->getName() == 'sDataBase');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == DB_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers database_base::generateDropTableSQL
|
||||
* @todo Implement testgenerateDropTableSQL().
|
||||
*/
|
||||
public function testgenerateDropTableSQL()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('generateDropTableSQL', $methods ), 'exists method generateDropTableSQL' );
|
||||
$r = new ReflectionMethod('database_base', 'generateDropTableSQL');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sTable');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers database_base::generateCreateTableSQL
|
||||
* @todo Implement testgenerateCreateTableSQL().
|
||||
*/
|
||||
public function testgenerateCreateTableSQL()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('generateCreateTableSQL', $methods ), 'exists method generateCreateTableSQL' );
|
||||
$r = new ReflectionMethod('database_base', 'generateCreateTableSQL');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sTable');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'aColumns');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers database_base::generateDropColumnSQL
|
||||
* @todo Implement testgenerateDropColumnSQL().
|
||||
*/
|
||||
public function testgenerateDropColumnSQL()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('generateDropColumnSQL', $methods ), 'exists method generateDropColumnSQL' );
|
||||
$r = new ReflectionMethod('database_base', 'generateDropColumnSQL');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sTable');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sColumn');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers database_base::generateAddColumnSQL
|
||||
* @todo Implement testgenerateAddColumnSQL().
|
||||
*/
|
||||
public function testgenerateAddColumnSQL()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('generateAddColumnSQL', $methods ), 'exists method generateAddColumnSQL' );
|
||||
$r = new ReflectionMethod('database_base', 'generateAddColumnSQL');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sTable');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sColumn');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'aParameters');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers database_base::generateChangeColumnSQL
|
||||
* @todo Implement testgenerateChangeColumnSQL().
|
||||
*/
|
||||
public function testgenerateChangeColumnSQL()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('generateChangeColumnSQL', $methods ), 'exists method generateChangeColumnSQL' );
|
||||
$r = new ReflectionMethod('database_base', 'generateChangeColumnSQL');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sTable');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sColumn');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'aParameters');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers database_base::executeQuery
|
||||
* @todo Implement testexecuteQuery().
|
||||
*/
|
||||
public function testexecuteQuery()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('executeQuery', $methods ), 'exists method executeQuery' );
|
||||
$r = new ReflectionMethod('database_base', 'executeQuery');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sQuery');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers database_base::close
|
||||
* @todo Implement testclose().
|
||||
*/
|
||||
public function testclose()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('close', $methods ), 'exists method close' );
|
||||
$r = new ReflectionMethod('database_base', 'close');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,444 +0,0 @@
|
||||
<?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.dynaformhandler.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classdynaFormHandlerTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var dynaFormHandler
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$file=PATH_TRUNK . 'workflow/engine/xmlform/login/login.xml';
|
||||
$this->object = new dynaFormHandler($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('dynaFormHandler'); $this->assertTrue( count($methods) == 24);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::__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('dynaFormHandler', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'file');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::load
|
||||
* @todo Implement testload().
|
||||
*/
|
||||
public function testload()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('load', $methods ), 'exists method load' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'load');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::reload
|
||||
* @todo Implement testreload().
|
||||
*/
|
||||
public function testreload()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('reload', $methods ), 'exists method reload' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'reload');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::__cloneEmpty
|
||||
* @todo Implement test__cloneEmpty().
|
||||
*/
|
||||
public function test__cloneEmpty()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__cloneEmpty', $methods ), 'exists method __cloneEmpty' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', '__cloneEmpty');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::toString
|
||||
* @todo Implement testtoString().
|
||||
*/
|
||||
public function testtoString()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('toString', $methods ), 'exists method toString' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'toString');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'op');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::getNode
|
||||
* @todo Implement testgetNode().
|
||||
*/
|
||||
public function testgetNode()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getNode', $methods ), 'exists method getNode' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'getNode');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'nodename');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::setNode
|
||||
* @todo Implement testsetNode().
|
||||
*/
|
||||
public function testsetNode()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setNode', $methods ), 'exists method setNode' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'setNode');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'node');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::add
|
||||
* @todo Implement testadd().
|
||||
*/
|
||||
public function testadd()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('add', $methods ), 'exists method add' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'add');
|
||||
$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() == 'attributes');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'childs');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'childs_childs');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::replace
|
||||
* @todo Implement testreplace().
|
||||
*/
|
||||
public function testreplace()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('replace', $methods ), 'exists method replace' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'replace');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'replaced');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'name');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'attributes');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'childs');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'childs_childs');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::save
|
||||
* @todo Implement testsave().
|
||||
*/
|
||||
public function testsave()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('save', $methods ), 'exists method save' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'save');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'fname');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::fixXmlFile
|
||||
* @todo Implement testfixXmlFile().
|
||||
*/
|
||||
public function testfixXmlFile()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('fixXmlFile', $methods ), 'exists method fixXmlFile' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'fixXmlFile');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::setHeaderAttribute
|
||||
* @todo Implement testsetHeaderAttribute().
|
||||
*/
|
||||
public function testsetHeaderAttribute()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setHeaderAttribute', $methods ), 'exists method setHeaderAttribute' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'setHeaderAttribute');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'att_name');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'att_value');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::modifyHeaderAttribute
|
||||
* @todo Implement testmodifyHeaderAttribute().
|
||||
*/
|
||||
public function testmodifyHeaderAttribute()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('modifyHeaderAttribute', $methods ), 'exists method modifyHeaderAttribute' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'modifyHeaderAttribute');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'att_name');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'att_new_value');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::updateAttribute
|
||||
* @todo Implement testupdateAttribute().
|
||||
*/
|
||||
public function testupdateAttribute()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('updateAttribute', $methods ), 'exists method updateAttribute' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'updateAttribute');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'node_name');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'att_name');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'att_new_value');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::remove
|
||||
* @todo Implement testremove().
|
||||
*/
|
||||
public function testremove()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('remove', $methods ), 'exists method remove' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'remove');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'v');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::nodeExists
|
||||
* @todo Implement testnodeExists().
|
||||
*/
|
||||
public function testnodeExists()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('nodeExists', $methods ), 'exists method nodeExists' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'nodeExists');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'node_name');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::moveUp
|
||||
* @todo Implement testmoveUp().
|
||||
*/
|
||||
public function testmoveUp()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('moveUp', $methods ), 'exists method moveUp' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'moveUp');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'selected_node');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::moveDown
|
||||
* @todo Implement testmoveDown().
|
||||
*/
|
||||
public function testmoveDown()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('moveDown', $methods ), 'exists method moveDown' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'moveDown');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'selected_node');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::getFields
|
||||
* @todo Implement testgetFields().
|
||||
*/
|
||||
public function testgetFields()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getFields', $methods ), 'exists method getFields' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'getFields');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aFilter');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::getFieldNames
|
||||
* @todo Implement testgetFieldNames().
|
||||
*/
|
||||
public function testgetFieldNames()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getFieldNames', $methods ), 'exists method getFieldNames' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'getFieldNames');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aFilter');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::addChilds
|
||||
* @todo Implement testaddChilds().
|
||||
*/
|
||||
public function testaddChilds()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addChilds', $methods ), 'exists method addChilds' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'addChilds');
|
||||
$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() == 'childs');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'childs_childs');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::addOrUpdateChild
|
||||
* @todo Implement testaddOrUpdateChild().
|
||||
*/
|
||||
public function testaddOrUpdateChild()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addOrUpdateChild', $methods ), 'exists method addOrUpdateChild' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'addOrUpdateChild');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'xnode');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'childName');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'childValue');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'childAttributes');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers dynaFormHandler::getArray
|
||||
* @todo Implement testgetArray().
|
||||
*/
|
||||
public function testgetArray()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getArray', $methods ), 'exists method getArray' );
|
||||
$r = new ReflectionMethod('dynaFormHandler', 'getArray');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'node');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'attributes');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
<?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.filterForm.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classfilterFormTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var filterForm
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$template = 'login/login';
|
||||
$scriptContent = '';
|
||||
$this->object = new filterForm($template, &$scriptContent);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('filterForm'); $this->assertTrue( count($methods) == 13);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers filterForm::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('filterForm', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'template');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'scriptContent');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,461 +0,0 @@
|
||||
<?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.headPublisher.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
||||
*/
|
||||
|
||||
class classheadPublisherTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var headPublisher
|
||||
*/
|
||||
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 headPublisher();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('headPublisher'); $this->assertTrue( count($methods) == 27);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::__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('headPublisher', '__construct');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::getSingleton
|
||||
* @todo Implement testgetSingleton().
|
||||
*/
|
||||
public function testgetSingleton()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getSingleton', $methods ), 'exists method getSingleton' );
|
||||
$r = new ReflectionMethod('headPublisher', 'getSingleton');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::setTitle
|
||||
* @todo Implement testsetTitle().
|
||||
*/
|
||||
public function testsetTitle()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setTitle', $methods ), 'exists method setTitle' );
|
||||
$r = new ReflectionMethod('headPublisher', 'setTitle');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'title');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::addMaborakFile
|
||||
* @todo Implement testaddMaborakFile().
|
||||
*/
|
||||
/*public function testaddMaborakFile()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addMaborakFile', $methods ), 'exists method addMaborakFile' );
|
||||
$r = new ReflectionMethod('headPublisher', 'addMaborakFile');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'filename');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'loader');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}*/
|
||||
|
||||
/**
|
||||
* @covers headPublisher::addScriptFile
|
||||
* @todo Implement testaddScriptFile().
|
||||
*/
|
||||
public function testaddScriptFile()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addScriptFile', $methods ), 'exists method addScriptFile' );
|
||||
$r = new ReflectionMethod('headPublisher', 'addScriptFile');
|
||||
$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() == 'LoadType');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '1');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::addInstanceModule
|
||||
* @todo Implement testaddInstanceModule().
|
||||
*/
|
||||
public function testaddInstanceModule()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addInstanceModule', $methods ), 'exists method addInstanceModule' );
|
||||
$r = new ReflectionMethod('headPublisher', 'addInstanceModule');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'instance');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'module');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::addClassModule
|
||||
* @todo Implement testaddClassModule().
|
||||
*/
|
||||
public function testaddClassModule()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addClassModule', $methods ), 'exists method addClassModule' );
|
||||
$r = new ReflectionMethod('headPublisher', 'addClassModule');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'class');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'module');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::addScriptCode
|
||||
* @todo Implement testaddScriptCode().
|
||||
*/
|
||||
public function testaddScriptCode()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addScriptCode', $methods ), 'exists method addScriptCode' );
|
||||
$r = new ReflectionMethod('headPublisher', 'addScriptCode');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'script');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::printHeader
|
||||
* @todo Implement testprintHeader().
|
||||
*/
|
||||
public function testprintHeader()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printHeader', $methods ), 'exists method printHeader' );
|
||||
$r = new ReflectionMethod('headPublisher', 'printHeader');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::printRawHeader
|
||||
* @todo Implement testprintRawHeader().
|
||||
*/
|
||||
public function testprintRawHeader()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printRawHeader', $methods ), 'exists method printRawHeader' );
|
||||
$r = new ReflectionMethod('headPublisher', 'printRawHeader');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::clearScripts
|
||||
* @todo Implement testclearScripts().
|
||||
*/
|
||||
public function testclearScripts()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('clearScripts', $methods ), 'exists method clearScripts' );
|
||||
$r = new ReflectionMethod('headPublisher', 'clearScripts');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::includeExtJs
|
||||
* @todo Implement testincludeExtJs().
|
||||
*/
|
||||
public function testincludeExtJs()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('includeExtJs', $methods ), 'exists method includeExtJs' );
|
||||
$r = new ReflectionMethod('headPublisher', 'includeExtJs');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::getExtJsStylesheets
|
||||
* @todo Implement testgetExtJsStylesheets().
|
||||
*/
|
||||
public function testgetExtJsStylesheets()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getExtJsStylesheets', $methods ), 'exists method getExtJsStylesheets' );
|
||||
$r = new ReflectionMethod('headPublisher', 'getExtJsStylesheets');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'skinName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::getExtJsScripts
|
||||
* @todo Implement testgetExtJsScripts().
|
||||
*/
|
||||
public function testgetExtJsScripts()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getExtJsScripts', $methods ), 'exists method getExtJsScripts' );
|
||||
$r = new ReflectionMethod('headPublisher', 'getExtJsScripts');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::getExtJsVariablesScript
|
||||
* @todo Implement testgetExtJsVariablesScript().
|
||||
*/
|
||||
public function testgetExtJsVariablesScript()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getExtJsVariablesScript', $methods ), 'exists method getExtJsVariablesScript' );
|
||||
$r = new ReflectionMethod('headPublisher', 'getExtJsVariablesScript');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::getExtJsLibraries
|
||||
* @todo Implement testgetExtJsLibraries().
|
||||
*/
|
||||
public function testgetExtJsLibraries()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getExtJsLibraries', $methods ), 'exists method getExtJsLibraries' );
|
||||
$r = new ReflectionMethod('headPublisher', 'getExtJsLibraries');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::usingExtJs
|
||||
* @todo Implement testusingExtJs().
|
||||
*/
|
||||
public function testusingExtJs()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('usingExtJs', $methods ), 'exists method usingExtJs' );
|
||||
$r = new ReflectionMethod('headPublisher', 'usingExtJs');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'library');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::setExtSkin
|
||||
* @todo Implement testsetExtSkin().
|
||||
*/
|
||||
public function testsetExtSkin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setExtSkin', $methods ), 'exists method setExtSkin' );
|
||||
$r = new ReflectionMethod('headPublisher', 'setExtSkin');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'skin');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::addExtJsScript
|
||||
* @todo Implement testaddExtJsScript().
|
||||
*/
|
||||
public function testaddExtJsScript()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addExtJsScript', $methods ), 'exists method addExtJsScript' );
|
||||
$r = new ReflectionMethod('headPublisher', 'addExtJsScript');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'filename');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'debug');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'isExternal');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::AddContent
|
||||
* @todo Implement testAddContent().
|
||||
*/
|
||||
public function testAddContent()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('AddContent', $methods ), 'exists method AddContent' );
|
||||
$r = new ReflectionMethod('headPublisher', 'AddContent');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'templateHtml');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::getContent
|
||||
* @todo Implement testgetContent().
|
||||
*/
|
||||
public function testgetContent()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getContent', $methods ), 'exists method getContent' );
|
||||
$r = new ReflectionMethod('headPublisher', 'getContent');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::Assign
|
||||
* @todo Implement testAssign().
|
||||
*/
|
||||
public function testAssign()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('Assign', $methods ), 'exists method Assign' );
|
||||
$r = new ReflectionMethod('headPublisher', 'Assign');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'variable');
|
||||
$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 headPublisher::AssignVar
|
||||
* @todo Implement testAssignVar().
|
||||
*/
|
||||
public function testAssignVar()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('AssignVar', $methods ), 'exists method AssignVar' );
|
||||
$r = new ReflectionMethod('headPublisher', 'AssignVar');
|
||||
$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 headPublisher::getVars
|
||||
* @todo Implement testgetVars().
|
||||
*/
|
||||
public function testgetVars()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getVars', $methods ), 'exists method getVars' );
|
||||
$r = new ReflectionMethod('headPublisher', 'getVars');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::AssignNumber
|
||||
* @todo Implement testAssignNumber().
|
||||
*/
|
||||
public function testAssignNumber()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('AssignNumber', $methods ), 'exists method AssignNumber' );
|
||||
$r = new ReflectionMethod('headPublisher', 'AssignNumber');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'variable');
|
||||
$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 headPublisher::renderExtJs
|
||||
* @todo Implement testrenderExtJs().
|
||||
*/
|
||||
public function testrenderExtJs()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderExtJs', $methods ), 'exists method renderExtJs' );
|
||||
$r = new ReflectionMethod('headPublisher', 'renderExtJs');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::stripCodeQuotes
|
||||
* @todo Implement teststripCodeQuotes().
|
||||
*/
|
||||
public function teststripCodeQuotes()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('stripCodeQuotes', $methods ), 'exists method stripCodeQuotes' );
|
||||
$r = new ReflectionMethod('headPublisher', 'stripCodeQuotes');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sJson');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers headPublisher::disableHeaderScripts
|
||||
* @todo Implement testdisableHeaderScripts().
|
||||
*/
|
||||
public function testdisableHeaderScripts()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('disableHeaderScripts', $methods ), 'exists method disableHeaderScripts' );
|
||||
$r = new ReflectionMethod('headPublisher', 'disableHeaderScripts');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,297 +0,0 @@
|
||||
<?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.i18n_po.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classi18n_POTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var i18n_PO
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$file='';
|
||||
$this->object = new i18n_PO($file);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('i18n_PO'); $this->assertTrue( count($methods) == 17);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::__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('i18n_PO', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'file');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::buildInit
|
||||
* @todo Implement testbuildInit().
|
||||
*/
|
||||
public function testbuildInit()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('buildInit', $methods ), 'exists method buildInit' );
|
||||
$r = new ReflectionMethod('i18n_PO', 'buildInit');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::readInit
|
||||
* @todo Implement testreadInit().
|
||||
*/
|
||||
public function testreadInit()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('readInit', $methods ), 'exists method readInit' );
|
||||
$r = new ReflectionMethod('i18n_PO', 'readInit');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::addHeader
|
||||
* @todo Implement testaddHeader().
|
||||
*/
|
||||
public function testaddHeader()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addHeader', $methods ), 'exists method addHeader' );
|
||||
$r = new ReflectionMethod('i18n_PO', 'addHeader');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'id');
|
||||
$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 i18n_PO::addTranslatorComment
|
||||
* @todo Implement testaddTranslatorComment().
|
||||
*/
|
||||
public function testaddTranslatorComment()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addTranslatorComment', $methods ), 'exists method addTranslatorComment' );
|
||||
$r = new ReflectionMethod('i18n_PO', 'addTranslatorComment');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'str');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::addExtractedComment
|
||||
* @todo Implement testaddExtractedComment().
|
||||
*/
|
||||
public function testaddExtractedComment()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addExtractedComment', $methods ), 'exists method addExtractedComment' );
|
||||
$r = new ReflectionMethod('i18n_PO', 'addExtractedComment');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'str');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::addReference
|
||||
* @todo Implement testaddReference().
|
||||
*/
|
||||
public function testaddReference()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addReference', $methods ), 'exists method addReference' );
|
||||
$r = new ReflectionMethod('i18n_PO', 'addReference');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'str');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::addFlag
|
||||
* @todo Implement testaddFlag().
|
||||
*/
|
||||
public function testaddFlag()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addFlag', $methods ), 'exists method addFlag' );
|
||||
$r = new ReflectionMethod('i18n_PO', 'addFlag');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'str');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::addPreviousUntranslatedString
|
||||
* @todo Implement testaddPreviousUntranslatedString().
|
||||
*/
|
||||
public function testaddPreviousUntranslatedString()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addPreviousUntranslatedString', $methods ), 'exists method addPreviousUntranslatedString' );
|
||||
$r = new ReflectionMethod('i18n_PO', 'addPreviousUntranslatedString');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'str');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::addTranslation
|
||||
* @todo Implement testaddTranslation().
|
||||
*/
|
||||
public function testaddTranslation()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addTranslation', $methods ), 'exists method addTranslation' );
|
||||
$r = new ReflectionMethod('i18n_PO', 'addTranslation');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'msgid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'msgstr');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::_writeLine
|
||||
* @todo Implement test_writeLine().
|
||||
*/
|
||||
public function test_writeLine()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('_writeLine', $methods ), 'exists method _writeLine' );
|
||||
$r = new ReflectionMethod('i18n_PO', '_writeLine');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'str');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::_write
|
||||
* @todo Implement test_write().
|
||||
*/
|
||||
public function test_write()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('_write', $methods ), 'exists method _write' );
|
||||
$r = new ReflectionMethod('i18n_PO', '_write');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'str');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::prepare
|
||||
* @todo Implement testprepare().
|
||||
*/
|
||||
public function testprepare()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('prepare', $methods ), 'exists method prepare' );
|
||||
$r = new ReflectionMethod('i18n_PO', 'prepare');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'string');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'reverse');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::headerStroke
|
||||
* @todo Implement testheaderStroke().
|
||||
*/
|
||||
public function testheaderStroke()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('headerStroke', $methods ), 'exists method headerStroke' );
|
||||
$r = new ReflectionMethod('i18n_PO', 'headerStroke');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::getHeaders
|
||||
* @todo Implement testgetHeaders().
|
||||
*/
|
||||
public function testgetHeaders()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getHeaders', $methods ), 'exists method getHeaders' );
|
||||
$r = new ReflectionMethod('i18n_PO', 'getHeaders');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::getTranslation
|
||||
* @todo Implement testgetTranslation().
|
||||
*/
|
||||
public function testgetTranslation()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getTranslation', $methods ), 'exists method getTranslation' );
|
||||
$r = new ReflectionMethod('i18n_PO', 'getTranslation');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers i18n_PO::__destruct
|
||||
* @todo Implement test__destruct().
|
||||
*/
|
||||
public function test__destruct()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__destruct', $methods ), 'exists method __destruct' );
|
||||
$r = new ReflectionMethod('i18n_PO', '__destruct');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,252 +0,0 @@
|
||||
<?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.mailer.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
||||
*/
|
||||
|
||||
class classmailerTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var mailer
|
||||
*/
|
||||
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 mailer();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('mailer'); $this->assertTrue( count($methods) == 7);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers mailer::instanceMailer
|
||||
* @todo Implement testinstanceMailer().
|
||||
*/
|
||||
public function testinstanceMailer()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('instanceMailer', $methods ), 'exists method instanceMailer' );
|
||||
$r = new ReflectionMethod('mailer', 'instanceMailer');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers mailer::arpaEMAIL
|
||||
* @todo Implement testarpaEMAIL().
|
||||
*/
|
||||
public function testarpaEMAIL()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('arpaEMAIL', $methods ), 'exists method arpaEMAIL' );
|
||||
$r = new ReflectionMethod('mailer', 'arpaEMAIL');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'address');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers mailer::sendTemplate
|
||||
* @todo Implement testsendTemplate().
|
||||
*/
|
||||
public function testsendTemplate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('sendTemplate', $methods ), 'exists method sendTemplate' );
|
||||
$r = new ReflectionMethod('mailer', 'sendTemplate');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'from');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'target');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'cc');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'bcc');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'subject');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[5]->getName() == 'Fields');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == true);
|
||||
$this->assertTrue( $params[5]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[6]->getName() == 'templateFile');
|
||||
$this->assertTrue( $params[6]->isArray() == false);
|
||||
$this->assertTrue( $params[6]->isOptional () == true);
|
||||
$this->assertTrue( $params[6]->getDefaultValue() == 'empty.html');
|
||||
$this->assertTrue( $params[7]->getName() == 'attachs');
|
||||
$this->assertTrue( $params[7]->isArray() == false);
|
||||
$this->assertTrue( $params[7]->isOptional () == true);
|
||||
$this->assertTrue( $params[7]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[8]->getName() == 'plainText');
|
||||
$this->assertTrue( $params[8]->isArray() == false);
|
||||
$this->assertTrue( $params[8]->isOptional () == true);
|
||||
$this->assertTrue( $params[8]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[9]->getName() == 'returnContent');
|
||||
$this->assertTrue( $params[9]->isArray() == false);
|
||||
$this->assertTrue( $params[9]->isOptional () == true);
|
||||
$this->assertTrue( $params[9]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers mailer::sendHtml
|
||||
* @todo Implement testsendHtml().
|
||||
*/
|
||||
public function testsendHtml()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('sendHtml', $methods ), 'exists method sendHtml' );
|
||||
$r = new ReflectionMethod('mailer', 'sendHtml');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'from');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'target');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'cc');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'bcc');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'subject');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[5]->getName() == 'Fields');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == true);
|
||||
$this->assertTrue( $params[5]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[6]->getName() == 'content');
|
||||
$this->assertTrue( $params[6]->isArray() == false);
|
||||
$this->assertTrue( $params[6]->isOptional () == true);
|
||||
$this->assertTrue( $params[6]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[7]->getName() == 'attachs');
|
||||
$this->assertTrue( $params[7]->isArray() == false);
|
||||
$this->assertTrue( $params[7]->isOptional () == true);
|
||||
$this->assertTrue( $params[7]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[8]->getName() == 'plainText');
|
||||
$this->assertTrue( $params[8]->isArray() == false);
|
||||
$this->assertTrue( $params[8]->isOptional () == true);
|
||||
$this->assertTrue( $params[8]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[9]->getName() == 'returnContent');
|
||||
$this->assertTrue( $params[9]->isArray() == false);
|
||||
$this->assertTrue( $params[9]->isOptional () == true);
|
||||
$this->assertTrue( $params[9]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers mailer::sendText
|
||||
* @todo Implement testsendText().
|
||||
*/
|
||||
public function testsendText()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('sendText', $methods ), 'exists method sendText' );
|
||||
$r = new ReflectionMethod('mailer', 'sendText');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'from');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'target');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'cc');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'bcc');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'subject');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[5]->getName() == 'content');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == true);
|
||||
$this->assertTrue( $params[5]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[6]->getName() == 'attachs');
|
||||
$this->assertTrue( $params[6]->isArray() == false);
|
||||
$this->assertTrue( $params[6]->isOptional () == true);
|
||||
$this->assertTrue( $params[6]->getDefaultValue() == Array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers mailer::replaceFields
|
||||
* @todo Implement testreplaceFields().
|
||||
*/
|
||||
public function testreplaceFields()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('replaceFields', $methods ), 'exists method replaceFields' );
|
||||
$r = new ReflectionMethod('mailer', 'replaceFields');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'Fields');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[1]->getName() == 'content');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers mailer::html2text
|
||||
* @todo Implement testhtml2text().
|
||||
*/
|
||||
public function testhtml2text()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('html2text', $methods ), 'exists method html2text' );
|
||||
$r = new ReflectionMethod('mailer', 'html2text');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
<?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.objectTemplate.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
||||
*/
|
||||
|
||||
class classobjectTemplateTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var objectTemplate
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$templateFile = '';
|
||||
$this->object = new objectTemplate($templateFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('objectTemplate');
|
||||
$this->assertTrue( count($methods) == 60);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers objectTemplate::objectTemplate
|
||||
* @todo Implement testobjectTemplate().
|
||||
*/
|
||||
public function testobjectTemplate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('objectTemplate', $methods ), 'exists method objectTemplate' );
|
||||
$r = new ReflectionMethod('objectTemplate', 'objectTemplate');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'templateFile');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers objectTemplate::printObject
|
||||
* @todo Implement testprintObject().
|
||||
*/
|
||||
public function testprintObject()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printObject', $methods ), 'exists method printObject' );
|
||||
$r = new ReflectionMethod('objectTemplate', 'printObject');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'object');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,180 +0,0 @@
|
||||
<?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.pagedTable.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
||||
*/
|
||||
|
||||
class classpagedTableTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var pagedTable
|
||||
*/
|
||||
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 pagedTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('pagedTable'); $this->assertTrue( count($methods) == 9);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers pagedTable::analizeSql
|
||||
* @todo Implement testanalizeSql().
|
||||
*/
|
||||
public function testanalizeSql()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('analizeSql', $methods ), 'exists method analizeSql' );
|
||||
$r = new ReflectionMethod('pagedTable', 'analizeSql');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers pagedTable::prepareQuery
|
||||
* @todo Implement testprepareQuery().
|
||||
*/
|
||||
public function testprepareQuery()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('prepareQuery', $methods ), 'exists method prepareQuery' );
|
||||
$r = new ReflectionMethod('pagedTable', 'prepareQuery');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers pagedTable::setupFromXmlform
|
||||
* @todo Implement testsetupFromXmlform().
|
||||
*/
|
||||
public function testsetupFromXmlform()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setupFromXmlform', $methods ), 'exists method setupFromXmlform' );
|
||||
$r = new ReflectionMethod('pagedTable', 'setupFromXmlform');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'xmlForm');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers pagedTable::count
|
||||
* @todo Implement testcount().
|
||||
*/
|
||||
public function testcount()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('count', $methods ), 'exists method count' );
|
||||
$r = new ReflectionMethod('pagedTable', 'count');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers pagedTable::renderTitle
|
||||
* @todo Implement testrenderTitle().
|
||||
*/
|
||||
public function testrenderTitle()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderTitle', $methods ), 'exists method renderTitle' );
|
||||
$r = new ReflectionMethod('pagedTable', 'renderTitle');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers pagedTable::renderField
|
||||
* @todo Implement testrenderField().
|
||||
*/
|
||||
public function testrenderField()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderField', $methods ), 'exists method renderField' );
|
||||
$r = new ReflectionMethod('pagedTable', 'renderField');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'row');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'r');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'result');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers pagedTable::defaultStyle
|
||||
* @todo Implement testdefaultStyle().
|
||||
*/
|
||||
public function testdefaultStyle()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('defaultStyle', $methods ), 'exists method defaultStyle' );
|
||||
$r = new ReflectionMethod('pagedTable', 'defaultStyle');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers pagedTable::renderTable
|
||||
* @todo Implement testrenderTable().
|
||||
*/
|
||||
public function testrenderTable()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderTable', $methods ), 'exists method renderTable' );
|
||||
$r = new ReflectionMethod('pagedTable', 'renderTable');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'block');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers pagedTable::printForm
|
||||
* @todo Implement testprintForm().
|
||||
*/
|
||||
public function testprintForm()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printForm', $methods ), 'exists method printForm' );
|
||||
$r = new ReflectionMethod('pagedTable', 'printForm');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'filename');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'data');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == Array());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
<?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.xmlMenu.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
||||
*/
|
||||
|
||||
class classxmlMenuTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var xmlMenu
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$file = 'login/login.xml';
|
||||
$home = PATH_TRUNK . 'workflow/engine/xmlform/';
|
||||
$this->object = new xmlMenu($file, $home);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('xmlMenu'); $this->assertTrue( count($methods) == 13);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,234 +0,0 @@
|
||||
<?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.xmlform.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classxmlformTemplateTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var xmlformTemplate
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$form = '';
|
||||
$templateFile = '';
|
||||
$this->object = new xmlformTemplate(&$form, $templateFile);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('xmlformTemplate'); $this->assertTrue( count($methods) == 68);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers xmlformTemplate::xmlformTemplate
|
||||
* @todo Implement testxmlformTemplate().
|
||||
*/
|
||||
public function testxmlformTemplate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('xmlformTemplate', $methods ), 'exists method xmlformTemplate' );
|
||||
$r = new ReflectionMethod('xmlformTemplate', 'xmlformTemplate');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'form');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'templateFile');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers xmlformTemplate::printTemplate
|
||||
* @todo Implement testprintTemplate().
|
||||
*/
|
||||
public function testprintTemplate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printTemplate', $methods ), 'exists method printTemplate' );
|
||||
$r = new ReflectionMethod('xmlformTemplate', 'printTemplate');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'form');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'target');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'smarty');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers xmlformTemplate::printJavaScript
|
||||
* @todo Implement testprintJavaScript().
|
||||
*/
|
||||
public function testprintJavaScript()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printJavaScript', $methods ), 'exists method printJavaScript' );
|
||||
$r = new ReflectionMethod('xmlformTemplate', 'printJavaScript');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'form');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers xmlformTemplate::printJSFile
|
||||
* @todo Implement testprintJSFile().
|
||||
*/
|
||||
public function testprintJSFile()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printJSFile', $methods ), 'exists method printJSFile' );
|
||||
$r = new ReflectionMethod('xmlformTemplate', 'printJSFile');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'form');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers xmlformTemplate::getFields
|
||||
* @todo Implement testgetFields().
|
||||
*/
|
||||
public function testgetFields()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getFields', $methods ), 'exists method getFields' );
|
||||
$r = new ReflectionMethod('xmlformTemplate', 'getFields');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'form');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'therow');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '-1');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers xmlformTemplate::printObject
|
||||
* @todo Implement testprintObject().
|
||||
*/
|
||||
public function testprintObject()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printObject', $methods ), 'exists method printObject' );
|
||||
$r = new ReflectionMethod('xmlformTemplate', 'printObject');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'form');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'therow');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '-1');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers xmlformTemplate::_get_template
|
||||
* @todo Implement test_get_template().
|
||||
*/
|
||||
public function test_get_template()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('_get_template', $methods ), 'exists method _get_template' );
|
||||
$r = new ReflectionMethod('xmlformTemplate', '_get_template');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'tpl_name');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'tpl_source');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'smarty_obj');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers xmlformTemplate::_get_timestamp
|
||||
* @todo Implement test_get_timestamp().
|
||||
*/
|
||||
public function test_get_timestamp()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('_get_timestamp', $methods ), 'exists method _get_timestamp' );
|
||||
$r = new ReflectionMethod('xmlformTemplate', '_get_timestamp');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'tpl_name');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'tpl_timestamp');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'smarty_obj');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers xmlformTemplate::_get_secure
|
||||
* @todo Implement test_get_secure().
|
||||
*/
|
||||
public function test_get_secure()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('_get_secure', $methods ), 'exists method _get_secure' );
|
||||
$r = new ReflectionMethod('xmlformTemplate', '_get_secure');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'tpl_name');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'smarty_obj');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers xmlformTemplate::_get_trusted
|
||||
* @todo Implement test_get_trusted().
|
||||
*/
|
||||
public function test_get_trusted()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('_get_trusted', $methods ), 'exists method _get_trusted' );
|
||||
$r = new ReflectionMethod('xmlformTemplate', '_get_trusted');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'tpl_name');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'smarty_obj');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,186 +0,0 @@
|
||||
<?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.ymlTestCases.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classymlTestCasesTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var ymlTestCases
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$testCaseFile = "";
|
||||
$testDomain ="";
|
||||
$testLime = "";
|
||||
$this->object = new ymlTestCases( $testCaseFile, &$testDomain, &$testLime);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('ymlTestCases'); $this->assertTrue( count($methods) == 6);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ymlTestCases::ymlTestCases
|
||||
* @todo Implement testymlTestCases().
|
||||
*/
|
||||
public function testymlTestCases()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('ymlTestCases', $methods ), 'exists method ymlTestCases' );
|
||||
$r = new ReflectionMethod('ymlTestCases', 'ymlTestCases');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'testCaseFile');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'testDomain');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'testLime');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ymlTestCases::load
|
||||
* @todo Implement testload().
|
||||
*/
|
||||
public function testload()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('load', $methods ), 'exists method load' );
|
||||
$r = new ReflectionMethod('ymlTestCases', 'load');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'inputTestCasesIndex');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == 'TestCases');
|
||||
$this->assertTrue( $params[1]->getName() == 'fields');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ymlTestCases::addToPlan
|
||||
* @todo Implement testaddToPlan().
|
||||
*/
|
||||
public function testaddToPlan()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addToPlan', $methods ), 'exists method addToPlan' );
|
||||
$r = new ReflectionMethod('ymlTestCases', 'addToPlan');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'count');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '-1');
|
||||
$this->assertTrue( $params[1]->getName() == 'start');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '0');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ymlTestCases::run
|
||||
* @todo Implement testrun().
|
||||
*/
|
||||
public function testrun()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('run', $methods ), 'exists method run' );
|
||||
$r = new ReflectionMethod('ymlTestCases', 'run');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'testerObject');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'fields');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == array());
|
||||
$this->assertTrue( $params[2]->getName() == 'count');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '-1');
|
||||
$this->assertTrue( $params[3]->getName() == 'start');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '0');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ymlTestCases::runSingle
|
||||
* @todo Implement testrunSingle().
|
||||
*/
|
||||
public function testrunSingle()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('runSingle', $methods ), 'exists method runSingle' );
|
||||
$r = new ReflectionMethod('ymlTestCases', 'runSingle');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'testerObject');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'fields');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ymlTestCases::runMultiple
|
||||
* @todo Implement testrunMultiple().
|
||||
*/
|
||||
public function testrunMultiple()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('runMultiple', $methods ), 'exists method runMultiple' );
|
||||
$r = new ReflectionMethod('ymlTestCases', 'runMultiple');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'testerObject');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'fields');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == array());
|
||||
$this->assertTrue( $params[2]->getName() == 'count');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '-1');
|
||||
$this->assertTrue( $params[3]->getName() == 'start');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '0');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,560 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.AppSolr.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:25.
|
||||
*/
|
||||
|
||||
class classAppSolrTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var AppSolr
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$SolrEnabled = false;
|
||||
$SolrHost = 'localhost';
|
||||
$SolrInstance = '';
|
||||
$this->object = new AppSolr($SolrEnabled, $SolrHost, $SolrInstance);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('AppSolr');
|
||||
$this->assertTrue( count($methods) == 35);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::__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('AppSolr', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'SolrEnabled');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'SolrHost');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'SolrInstance');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::isSolrEnabled
|
||||
* @todo Implement testisSolrEnabled().
|
||||
*/
|
||||
public function testisSolrEnabled()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('isSolrEnabled', $methods ), 'exists method isSolrEnabled' );
|
||||
$r = new ReflectionMethod('AppSolr', 'isSolrEnabled');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::getAppGridData
|
||||
* @todo Implement testgetAppGridData().
|
||||
*/
|
||||
public function testgetAppGridData()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAppGridData', $methods ), 'exists method getAppGridData' );
|
||||
$r = new ReflectionMethod('AppSolr', 'getAppGridData');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'userUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'start');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'limit');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'action');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'filter');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[5]->getName() == 'search');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == true);
|
||||
$this->assertTrue( $params[5]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[6]->getName() == 'process');
|
||||
$this->assertTrue( $params[6]->isArray() == false);
|
||||
$this->assertTrue( $params[6]->isOptional () == true);
|
||||
$this->assertTrue( $params[6]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[7]->getName() == 'status');
|
||||
$this->assertTrue( $params[7]->isArray() == false);
|
||||
$this->assertTrue( $params[7]->isOptional () == true);
|
||||
$this->assertTrue( $params[7]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[8]->getName() == 'type');
|
||||
$this->assertTrue( $params[8]->isArray() == false);
|
||||
$this->assertTrue( $params[8]->isOptional () == true);
|
||||
$this->assertTrue( $params[8]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[9]->getName() == 'dateFrom');
|
||||
$this->assertTrue( $params[9]->isArray() == false);
|
||||
$this->assertTrue( $params[9]->isOptional () == true);
|
||||
$this->assertTrue( $params[9]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[10]->getName() == 'dateTo');
|
||||
$this->assertTrue( $params[10]->isArray() == false);
|
||||
$this->assertTrue( $params[10]->isOptional () == true);
|
||||
$this->assertTrue( $params[10]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[11]->getName() == 'callback');
|
||||
$this->assertTrue( $params[11]->isArray() == false);
|
||||
$this->assertTrue( $params[11]->isOptional () == true);
|
||||
$this->assertTrue( $params[11]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[12]->getName() == 'dir');
|
||||
$this->assertTrue( $params[12]->isArray() == false);
|
||||
$this->assertTrue( $params[12]->isOptional () == true);
|
||||
$this->assertTrue( $params[12]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[13]->getName() == 'sort');
|
||||
$this->assertTrue( $params[13]->isArray() == false);
|
||||
$this->assertTrue( $params[13]->isOptional () == true);
|
||||
$this->assertTrue( $params[13]->getDefaultValue() == 'APP_CACHE_VIEW.APP_NUMBER');
|
||||
$this->assertTrue( $params[14]->getName() == 'category');
|
||||
$this->assertTrue( $params[14]->isArray() == false);
|
||||
$this->assertTrue( $params[14]->isOptional () == true);
|
||||
$this->assertTrue( $params[14]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[15]->getName() == 'doCount');
|
||||
$this->assertTrue( $params[15]->isArray() == false);
|
||||
$this->assertTrue( $params[15]->isOptional () == true);
|
||||
$this->assertTrue( $params[15]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::getCasesCount
|
||||
* @todo Implement testgetCasesCount().
|
||||
*/
|
||||
public function testgetCasesCount()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getCasesCount', $methods ), 'exists method getCasesCount' );
|
||||
$r = new ReflectionMethod('AppSolr', 'getCasesCount');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'userUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::getUserGroups
|
||||
* @todo Implement testgetUserGroups().
|
||||
*/
|
||||
public function testgetUserGroups()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getUserGroups', $methods ), 'exists method getUserGroups' );
|
||||
$r = new ReflectionMethod('AppSolr', 'getUserGroups');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'usrUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::getAppDelegationData
|
||||
* @todo Implement testgetAppDelegationData().
|
||||
*/
|
||||
public function testgetAppDelegationData()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAppDelegationData', $methods ), 'exists method getAppDelegationData' );
|
||||
$r = new ReflectionMethod('AppSolr', 'getAppDelegationData');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'appUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'delIndex');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::getSearchText
|
||||
* @todo Implement testgetSearchText().
|
||||
*/
|
||||
public function testgetSearchText()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getSearchText', $methods ), 'exists method getSearchText' );
|
||||
$r = new ReflectionMethod('AppSolr', 'getSearchText');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'plainSearchText');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::getApplicationDelegationsIndex
|
||||
* @todo Implement testgetApplicationDelegationsIndex().
|
||||
*/
|
||||
public function testgetApplicationDelegationsIndex()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getApplicationDelegationsIndex', $methods ), 'exists method getApplicationDelegationsIndex' );
|
||||
$r = new ReflectionMethod('AppSolr', 'getApplicationDelegationsIndex');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'appUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::updateApplicationSearchIndex
|
||||
* @todo Implement testupdateApplicationSearchIndex().
|
||||
*/
|
||||
public function testupdateApplicationSearchIndex()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('updateApplicationSearchIndex', $methods ), 'exists method updateApplicationSearchIndex' );
|
||||
$r = new ReflectionMethod('AppSolr', 'updateApplicationSearchIndex');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aaAPPUIDs');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::deleteApplicationSearchIndex
|
||||
* @todo Implement testdeleteApplicationSearchIndex().
|
||||
*/
|
||||
public function testdeleteApplicationSearchIndex()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('deleteApplicationSearchIndex', $methods ), 'exists method deleteApplicationSearchIndex' );
|
||||
$r = new ReflectionMethod('AppSolr', 'deleteApplicationSearchIndex');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'appUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::createSolrXMLDocument
|
||||
* @todo Implement testcreateSolrXMLDocument().
|
||||
*/
|
||||
public function testcreateSolrXMLDocument()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('createSolrXMLDocument', $methods ), 'exists method createSolrXMLDocument' );
|
||||
$r = new ReflectionMethod('AppSolr', 'createSolrXMLDocument');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aaAPPUIDs');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::buildSearchIndexDocumentPMOS2
|
||||
* @todo Implement testbuildSearchIndexDocumentPMOS2().
|
||||
*/
|
||||
public function testbuildSearchIndexDocumentPMOS2()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('buildSearchIndexDocumentPMOS2', $methods ), 'exists method buildSearchIndexDocumentPMOS2' );
|
||||
$r = new ReflectionMethod('AppSolr', 'buildSearchIndexDocumentPMOS2');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'documentData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'dynaformFieldTypes');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'lastUpdateDate');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'maxPriority');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == false);
|
||||
$this->assertTrue( $params[4]->getName() == 'assignedUsers');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == false);
|
||||
$this->assertTrue( $params[5]->getName() == 'assignedUsersRead');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == false);
|
||||
$this->assertTrue( $params[6]->getName() == 'assignedUsersUnread');
|
||||
$this->assertTrue( $params[6]->isArray() == false);
|
||||
$this->assertTrue( $params[6]->isOptional () == false);
|
||||
$this->assertTrue( $params[7]->getName() == 'draftUser');
|
||||
$this->assertTrue( $params[7]->isArray() == false);
|
||||
$this->assertTrue( $params[7]->isOptional () == false);
|
||||
$this->assertTrue( $params[8]->getName() == 'participatedUsers');
|
||||
$this->assertTrue( $params[8]->isArray() == false);
|
||||
$this->assertTrue( $params[8]->isOptional () == false);
|
||||
$this->assertTrue( $params[9]->getName() == 'participatedUsersStartedByUser');
|
||||
$this->assertTrue( $params[9]->isArray() == false);
|
||||
$this->assertTrue( $params[9]->isOptional () == false);
|
||||
$this->assertTrue( $params[10]->getName() == 'participatedUsersCompletedByUser');
|
||||
$this->assertTrue( $params[10]->isArray() == false);
|
||||
$this->assertTrue( $params[10]->isOptional () == false);
|
||||
$this->assertTrue( $params[11]->getName() == 'unassignedUsers');
|
||||
$this->assertTrue( $params[11]->isArray() == false);
|
||||
$this->assertTrue( $params[11]->isOptional () == false);
|
||||
$this->assertTrue( $params[12]->getName() == 'unassignedGroups');
|
||||
$this->assertTrue( $params[12]->isArray() == false);
|
||||
$this->assertTrue( $params[12]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::getApplicationIndexData
|
||||
* @todo Implement testgetApplicationIndexData().
|
||||
*/
|
||||
public function testgetApplicationIndexData()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getApplicationIndexData', $methods ), 'exists method getApplicationIndexData' );
|
||||
$r = new ReflectionMethod('AppSolr', 'getApplicationIndexData');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'AppUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::aaGetMaximun
|
||||
* @todo Implement testaaGetMaximun().
|
||||
*/
|
||||
public function testaaGetMaximun()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('aaGetMaximun', $methods ), 'exists method aaGetMaximun' );
|
||||
$r = new ReflectionMethod('AppSolr', 'aaGetMaximun');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'arr');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'column');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'columnType');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == 'STRING');
|
||||
$this->assertTrue( $params[3]->getName() == 'columnCondition');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'condition');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::aaGetMinimun
|
||||
* @todo Implement testaaGetMinimun().
|
||||
*/
|
||||
public function testaaGetMinimun()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('aaGetMinimun', $methods ), 'exists method aaGetMinimun' );
|
||||
$r = new ReflectionMethod('AppSolr', 'aaGetMinimun');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'arr');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'column');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'columnType');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == 'STRING');
|
||||
$this->assertTrue( $params[3]->getName() == 'columnCondition');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'condition');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::aaSearchRecords
|
||||
* @todo Implement testaaSearchRecords().
|
||||
*/
|
||||
public function testaaSearchRecords()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('aaSearchRecords', $methods ), 'exists method aaSearchRecords' );
|
||||
$r = new ReflectionMethod('AppSolr', 'aaSearchRecords');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'arr');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'andColumnsConditions');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::getApplicationDelegationData
|
||||
* @todo Implement testgetApplicationDelegationData().
|
||||
*/
|
||||
public function testgetApplicationDelegationData()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getApplicationDelegationData', $methods ), 'exists method getApplicationDelegationData' );
|
||||
$r = new ReflectionMethod('AppSolr', 'getApplicationDelegationData');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'AppUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::getTaskUnassignedUsersGroupsData
|
||||
* @todo Implement testgetTaskUnassignedUsersGroupsData().
|
||||
*/
|
||||
public function testgetTaskUnassignedUsersGroupsData()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getTaskUnassignedUsersGroupsData', $methods ), 'exists method getTaskUnassignedUsersGroupsData' );
|
||||
$r = new ReflectionMethod('AppSolr', 'getTaskUnassignedUsersGroupsData');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'ProUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'TaskUID');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::getProcessDynaformFileNames
|
||||
* @todo Implement testgetProcessDynaformFileNames().
|
||||
*/
|
||||
public function testgetProcessDynaformFileNames()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getProcessDynaformFileNames', $methods ), 'exists method getProcessDynaformFileNames' );
|
||||
$r = new ReflectionMethod('AppSolr', 'getProcessDynaformFileNames');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'ProUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::applicationChangedUpdateSolrQueue
|
||||
* @todo Implement testapplicationChangedUpdateSolrQueue().
|
||||
*/
|
||||
public function testapplicationChangedUpdateSolrQueue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('applicationChangedUpdateSolrQueue', $methods ), 'exists method applicationChangedUpdateSolrQueue' );
|
||||
$r = new ReflectionMethod('AppSolr', 'applicationChangedUpdateSolrQueue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'AppUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'updated');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::synchronizePendingApplications
|
||||
* @todo Implement testsynchronizePendingApplications().
|
||||
*/
|
||||
public function testsynchronizePendingApplications()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('synchronizePendingApplications', $methods ), 'exists method synchronizePendingApplications' );
|
||||
$r = new ReflectionMethod('AppSolr', 'synchronizePendingApplications');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::getCountApplicationsPMOS2
|
||||
* @todo Implement testgetCountApplicationsPMOS2().
|
||||
*/
|
||||
public function testgetCountApplicationsPMOS2()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getCountApplicationsPMOS2', $methods ), 'exists method getCountApplicationsPMOS2' );
|
||||
$r = new ReflectionMethod('AppSolr', 'getCountApplicationsPMOS2');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::getCountApplicationsSearchIndex
|
||||
* @todo Implement testgetCountApplicationsSearchIndex().
|
||||
*/
|
||||
public function testgetCountApplicationsSearchIndex()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getCountApplicationsSearchIndex', $methods ), 'exists method getCountApplicationsSearchIndex' );
|
||||
$r = new ReflectionMethod('AppSolr', 'getCountApplicationsSearchIndex');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::getPagedApplicationUids
|
||||
* @todo Implement testgetPagedApplicationUids().
|
||||
*/
|
||||
public function testgetPagedApplicationUids()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getPagedApplicationUids', $methods ), 'exists method getPagedApplicationUids' );
|
||||
$r = new ReflectionMethod('AppSolr', 'getPagedApplicationUids');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'skip');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'pagesize');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers AppSolr::reindexAllApplications
|
||||
* @todo Implement testreindexAllApplications().
|
||||
*/
|
||||
public function testreindexAllApplications()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('reindexAllApplications', $methods ), 'exists method reindexAllApplications' );
|
||||
$r = new ReflectionMethod('AppSolr', 'reindexAllApplications');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,82 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.AppSolr.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:25.
|
||||
*/
|
||||
|
||||
class classApplicationWithoutDelegationRecordsExceptionTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var ApplicationWithoutDelegationRecordsException
|
||||
*/
|
||||
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 ApplicationWithoutDelegationRecordsException('message');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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()
|
||||
{
|
||||
$class = new ReflectionClass('ApplicationWithoutDelegationRecordsException');
|
||||
$methods = $class->getMethods(ReflectionMethod::IS_PUBLIC);
|
||||
//$this->assertTrue( count($methods) == 9);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ApplicationWithoutDelegationRecordsException::__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('ApplicationWithoutDelegationRecordsException', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'message');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'code');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '0');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ApplicationWithoutDelegationRecordsException::__toString
|
||||
* @todo Implement test__toString().
|
||||
*/
|
||||
public function test__toString()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__toString', $methods ), 'exists method __toString' );
|
||||
$r = new ReflectionMethod('ApplicationWithoutDelegationRecordsException', '__toString');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,198 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.applications.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classApplicationsTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Applications
|
||||
*/
|
||||
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 Applications();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('Applications'); $this->assertTrue( count($methods) == 5);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Applications::getAll
|
||||
* @todo Implement testgetAll().
|
||||
*/
|
||||
public function testgetAll()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAll', $methods ), 'exists method getAll' );
|
||||
$r = new ReflectionMethod('Applications', 'getAll');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'userUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'start');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'limit');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'action');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'filter');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[5]->getName() == 'search');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == true);
|
||||
$this->assertTrue( $params[5]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[6]->getName() == 'process');
|
||||
$this->assertTrue( $params[6]->isArray() == false);
|
||||
$this->assertTrue( $params[6]->isOptional () == true);
|
||||
$this->assertTrue( $params[6]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[7]->getName() == 'status');
|
||||
$this->assertTrue( $params[7]->isArray() == false);
|
||||
$this->assertTrue( $params[7]->isOptional () == true);
|
||||
$this->assertTrue( $params[7]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[8]->getName() == 'type');
|
||||
$this->assertTrue( $params[8]->isArray() == false);
|
||||
$this->assertTrue( $params[8]->isOptional () == true);
|
||||
$this->assertTrue( $params[8]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[9]->getName() == 'dateFrom');
|
||||
$this->assertTrue( $params[9]->isArray() == false);
|
||||
$this->assertTrue( $params[9]->isOptional () == true);
|
||||
$this->assertTrue( $params[9]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[10]->getName() == 'dateTo');
|
||||
$this->assertTrue( $params[10]->isArray() == false);
|
||||
$this->assertTrue( $params[10]->isOptional () == true);
|
||||
$this->assertTrue( $params[10]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[11]->getName() == 'callback');
|
||||
$this->assertTrue( $params[11]->isArray() == false);
|
||||
$this->assertTrue( $params[11]->isOptional () == true);
|
||||
$this->assertTrue( $params[11]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[12]->getName() == 'dir');
|
||||
$this->assertTrue( $params[12]->isArray() == false);
|
||||
$this->assertTrue( $params[12]->isOptional () == true);
|
||||
$this->assertTrue( $params[12]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[13]->getName() == 'sort');
|
||||
$this->assertTrue( $params[13]->isArray() == false);
|
||||
$this->assertTrue( $params[13]->isOptional () == true);
|
||||
$this->assertTrue( $params[13]->getDefaultValue() == 'APP_CACHE_VIEW.APP_NUMBER');
|
||||
$this->assertTrue( $params[14]->getName() == 'category');
|
||||
$this->assertTrue( $params[14]->isArray() == false);
|
||||
$this->assertTrue( $params[14]->isOptional () == true);
|
||||
$this->assertTrue( $params[14]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Applications::setDefaultFields
|
||||
* @todo Implement testsetDefaultFields().
|
||||
*/
|
||||
public function testsetDefaultFields()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setDefaultFields', $methods ), 'exists method setDefaultFields' );
|
||||
$r = new ReflectionMethod('Applications', 'setDefaultFields');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Applications::getDefaultFields
|
||||
* @todo Implement testgetDefaultFields().
|
||||
*/
|
||||
public function testgetDefaultFields()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDefaultFields', $methods ), 'exists method getDefaultFields' );
|
||||
$r = new ReflectionMethod('Applications', 'getDefaultFields');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'action');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Applications::genericJsonResponse
|
||||
* @todo Implement testgenericJsonResponse().
|
||||
*/
|
||||
public function testgenericJsonResponse()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('genericJsonResponse', $methods ), 'exists method genericJsonResponse' );
|
||||
$r = new ReflectionMethod('Applications', 'genericJsonResponse');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'pmtable');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'first');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'second');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'rowsperpage');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == false);
|
||||
$this->assertTrue( $params[4]->getName() == 'dateFormat');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Applications::getSteps
|
||||
* @todo Implement testgetSteps().
|
||||
*/
|
||||
public function testgetSteps()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getSteps', $methods ), 'exists method getSteps' );
|
||||
$r = new ReflectionMethod('Applications', 'getSteps');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'appUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'index');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'tasUid');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'proUid');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,234 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.solr.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:31.
|
||||
*/
|
||||
|
||||
class classBpmnEngine_SearchIndexAccess_SolrTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var BpmnEngine_SearchIndexAccess_Solr
|
||||
*/
|
||||
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 BpmnEngine_SearchIndexAccess_Solr();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('BpmnEngine_SearchIndexAccess_Solr'); $this->assertTrue( count($methods) == 13);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_SearchIndexAccess_Solr::__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('BpmnEngine_SearchIndexAccess_Solr', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'solrIsEnabled');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'solrHost');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_SearchIndexAccess_Solr::isEnabled
|
||||
* @todo Implement testisEnabled().
|
||||
*/
|
||||
public function testisEnabled()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('isEnabled', $methods ), 'exists method isEnabled' );
|
||||
$r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'isEnabled');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_SearchIndexAccess_Solr::getNumberDocuments
|
||||
* @todo Implement testgetNumberDocuments().
|
||||
*/
|
||||
public function testgetNumberDocuments()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getNumberDocuments', $methods ), 'exists method getNumberDocuments' );
|
||||
$r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'getNumberDocuments');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_SearchIndexAccess_Solr::executeQuery
|
||||
* @todo Implement testexecuteQuery().
|
||||
*/
|
||||
public function testexecuteQuery()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('executeQuery', $methods ), 'exists method executeQuery' );
|
||||
$r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'executeQuery');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'solrRequestData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_SearchIndexAccess_Solr::updateDocument
|
||||
* @todo Implement testupdateDocument().
|
||||
*/
|
||||
public function testupdateDocument()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('updateDocument', $methods ), 'exists method updateDocument' );
|
||||
$r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'updateDocument');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'solrUpdateDocument');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_SearchIndexAccess_Solr::commitChanges
|
||||
* @todo Implement testcommitChanges().
|
||||
*/
|
||||
public function testcommitChanges()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('commitChanges', $methods ), 'exists method commitChanges' );
|
||||
$r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'commitChanges');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_SearchIndexAccess_Solr::rollbackChanges
|
||||
* @todo Implement testrollbackChanges().
|
||||
*/
|
||||
public function testrollbackChanges()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('rollbackChanges', $methods ), 'exists method rollbackChanges' );
|
||||
$r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'rollbackChanges');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_SearchIndexAccess_Solr::optimizeChanges
|
||||
* @todo Implement testoptimizeChanges().
|
||||
*/
|
||||
public function testoptimizeChanges()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('optimizeChanges', $methods ), 'exists method optimizeChanges' );
|
||||
$r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'optimizeChanges');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_SearchIndexAccess_Solr::getListIndexedStoredFields
|
||||
* @todo Implement testgetListIndexedStoredFields().
|
||||
*/
|
||||
public function testgetListIndexedStoredFields()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getListIndexedStoredFields', $methods ), 'exists method getListIndexedStoredFields' );
|
||||
$r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'getListIndexedStoredFields');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_SearchIndexAccess_Solr::deleteAllDocuments
|
||||
* @todo Implement testdeleteAllDocuments().
|
||||
*/
|
||||
public function testdeleteAllDocuments()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('deleteAllDocuments', $methods ), 'exists method deleteAllDocuments' );
|
||||
$r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'deleteAllDocuments');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_SearchIndexAccess_Solr::deleteDocument
|
||||
* @todo Implement testdeleteDocument().
|
||||
*/
|
||||
public function testdeleteDocument()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('deleteDocument', $methods ), 'exists method deleteDocument' );
|
||||
$r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'deleteDocument');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'idQuery');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_SearchIndexAccess_Solr::getFacetsList
|
||||
* @todo Implement testgetFacetsList().
|
||||
*/
|
||||
public function testgetFacetsList()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getFacetsList', $methods ), 'exists method getFacetsList' );
|
||||
$r = new ReflectionMethod('BpmnEngine_SearchIndexAccess_Solr', 'getFacetsList');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'facetRequest');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,190 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.searchIndex.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:30.
|
||||
*/
|
||||
|
||||
class classBpmnEngine_Services_SearchIndexTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var BpmnEngine_Services_SearchIndex
|
||||
*/
|
||||
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 BpmnEngine_Services_SearchIndex();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('BpmnEngine_Services_SearchIndex');
|
||||
$this->assertTrue( count($methods) == 10);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_Services_SearchIndex::__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('BpmnEngine_Services_SearchIndex', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'solrIsEnabled');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'solrHost');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_Services_SearchIndex::isEnabled
|
||||
* @todo Implement testisEnabled().
|
||||
*/
|
||||
public function testisEnabled()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('isEnabled', $methods ), 'exists method isEnabled' );
|
||||
$r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'isEnabled');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_Services_SearchIndex::getFacetsList
|
||||
* @todo Implement testgetFacetsList().
|
||||
*/
|
||||
public function testgetFacetsList()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getFacetsList', $methods ), 'exists method getFacetsList' );
|
||||
$r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'getFacetsList');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'facetRequestEntity');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_Services_SearchIndex::getNumberDocuments
|
||||
* @todo Implement testgetNumberDocuments().
|
||||
*/
|
||||
public function testgetNumberDocuments()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getNumberDocuments', $methods ), 'exists method getNumberDocuments' );
|
||||
$r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'getNumberDocuments');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_Services_SearchIndex::updateIndexDocument
|
||||
* @todo Implement testupdateIndexDocument().
|
||||
*/
|
||||
public function testupdateIndexDocument()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('updateIndexDocument', $methods ), 'exists method updateIndexDocument' );
|
||||
$r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'updateIndexDocument');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'solrUpdateDocumentEntity');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_Services_SearchIndex::deleteDocumentFromIndex
|
||||
* @todo Implement testdeleteDocumentFromIndex().
|
||||
*/
|
||||
public function testdeleteDocumentFromIndex()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('deleteDocumentFromIndex', $methods ), 'exists method deleteDocumentFromIndex' );
|
||||
$r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'deleteDocumentFromIndex');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'idQuery');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_Services_SearchIndex::commitIndexChanges
|
||||
* @todo Implement testcommitIndexChanges().
|
||||
*/
|
||||
public function testcommitIndexChanges()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('commitIndexChanges', $methods ), 'exists method commitIndexChanges' );
|
||||
$r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'commitIndexChanges');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_Services_SearchIndex::getDataTablePaginatedList
|
||||
* @todo Implement testgetDataTablePaginatedList().
|
||||
*/
|
||||
public function testgetDataTablePaginatedList()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDataTablePaginatedList', $methods ), 'exists method getDataTablePaginatedList' );
|
||||
$r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'getDataTablePaginatedList');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'solrRequestData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers BpmnEngine_Services_SearchIndex::getIndexFields
|
||||
* @todo Implement testgetIndexFields().
|
||||
*/
|
||||
public function testgetIndexFields()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getIndexFields', $methods ), 'exists method getIndexFields' );
|
||||
$r = new ReflectionMethod('BpmnEngine_Services_SearchIndex', 'getIndexFields');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,267 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.cli.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
|
||||
*/
|
||||
|
||||
class classCLITest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var CLI
|
||||
*/
|
||||
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 CLI();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('CLI'); $this->assertTrue( count($methods) == 13);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers CLI::taskName
|
||||
* @todo Implement testtaskName().
|
||||
*/
|
||||
public function testtaskName()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('taskName', $methods ), 'exists method taskName' );
|
||||
$r = new ReflectionMethod('CLI', 'taskName');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'name');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers CLI::taskDescription
|
||||
* @todo Implement testtaskDescription().
|
||||
*/
|
||||
public function testtaskDescription()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('taskDescription', $methods ), 'exists method taskDescription' );
|
||||
$r = new ReflectionMethod('CLI', 'taskDescription');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'description');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers CLI::taskArg
|
||||
* @todo Implement testtaskArg().
|
||||
*/
|
||||
public function testtaskArg()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('taskArg', $methods ), 'exists method taskArg' );
|
||||
$r = new ReflectionMethod('CLI', 'taskArg');
|
||||
$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() == 'optional');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '1');
|
||||
$this->assertTrue( $params[2]->getName() == 'multiple');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers CLI::taskOpt
|
||||
* @todo Implement testtaskOpt().
|
||||
*/
|
||||
public function testtaskOpt()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('taskOpt', $methods ), 'exists method taskOpt' );
|
||||
$r = new ReflectionMethod('CLI', 'taskOpt');
|
||||
$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() == 'description');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'short');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'long');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers CLI::taskRun
|
||||
* @todo Implement testtaskRun().
|
||||
*/
|
||||
public function testtaskRun()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('taskRun', $methods ), 'exists method taskRun' );
|
||||
$r = new ReflectionMethod('CLI', 'taskRun');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'function');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers CLI::help
|
||||
* @todo Implement testhelp().
|
||||
*/
|
||||
public function testhelp()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('help', $methods ), 'exists method help' );
|
||||
$r = new ReflectionMethod('CLI', 'help');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'args');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'opts');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers CLI::run
|
||||
* @todo Implement testrun().
|
||||
*/
|
||||
public function testrun()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('run', $methods ), 'exists method run' );
|
||||
$r = new ReflectionMethod('CLI', 'run');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers CLI::info
|
||||
* @todo Implement testinfo().
|
||||
*/
|
||||
public function testinfo()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('info', $methods ), 'exists method info' );
|
||||
$r = new ReflectionMethod('CLI', 'info');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'message');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers CLI::warning
|
||||
* @todo Implement testwarning().
|
||||
*/
|
||||
public function testwarning()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('warning', $methods ), 'exists method warning' );
|
||||
$r = new ReflectionMethod('CLI', 'warning');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'message');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers CLI::error
|
||||
* @todo Implement testerror().
|
||||
*/
|
||||
public function testerror()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('error', $methods ), 'exists method error' );
|
||||
$r = new ReflectionMethod('CLI', 'error');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'message');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers CLI::prompt
|
||||
* @todo Implement testprompt().
|
||||
*/
|
||||
public function testprompt()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('prompt', $methods ), 'exists method prompt' );
|
||||
$r = new ReflectionMethod('CLI', 'prompt');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'message');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers CLI::question
|
||||
* @todo Implement testquestion().
|
||||
*/
|
||||
public function testquestion()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('question', $methods ), 'exists method question' );
|
||||
$r = new ReflectionMethod('CLI', 'question');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'message');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers CLI::logging
|
||||
* @todo Implement testlogging().
|
||||
*/
|
||||
public function testlogging()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('logging', $methods ), 'exists method logging' );
|
||||
$r = new ReflectionMethod('CLI', 'logging');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'message');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'filename');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,398 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.configuration.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:31.
|
||||
*/
|
||||
|
||||
class classConfigurationsTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Configurations
|
||||
*/
|
||||
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 Configurations();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('Configurations'); $this->assertTrue( count($methods) == 17);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::Configurations
|
||||
* @todo Implement testConfigurations().
|
||||
*/
|
||||
public function testConfigurations()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('Configurations', $methods ), 'exists method Configurations' );
|
||||
$r = new ReflectionMethod('Configurations', 'Configurations');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::arrayClone
|
||||
* @todo Implement testarrayClone().
|
||||
*/
|
||||
public function testarrayClone()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('arrayClone', $methods ), 'exists method arrayClone' );
|
||||
$r = new ReflectionMethod('Configurations', 'arrayClone');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'object');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'cloneObject');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::configObject
|
||||
* @todo Implement testconfigObject().
|
||||
*/
|
||||
public function testconfigObject()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('configObject', $methods ), 'exists method configObject' );
|
||||
$r = new ReflectionMethod('Configurations', 'configObject');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'object');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'from');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::loadConfig
|
||||
* @todo Implement testloadConfig().
|
||||
*/
|
||||
public function testloadConfig()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('loadConfig', $methods ), 'exists method loadConfig' );
|
||||
$r = new ReflectionMethod('Configurations', 'loadConfig');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'object');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'cfg');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'obj');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'pro');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'usr');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[5]->getName() == 'app');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == true);
|
||||
$this->assertTrue( $params[5]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::load
|
||||
* @todo Implement testload().
|
||||
*/
|
||||
public function testload()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('load', $methods ), 'exists method load' );
|
||||
$r = new ReflectionMethod('Configurations', 'load');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'cfg');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'obj');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[2]->getName() == 'pro');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'usr');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'app');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::saveConfig
|
||||
* @todo Implement testsaveConfig().
|
||||
*/
|
||||
public function testsaveConfig()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('saveConfig', $methods ), 'exists method saveConfig' );
|
||||
$r = new ReflectionMethod('Configurations', 'saveConfig');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'cfg');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'obj');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'pro');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'usr');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'app');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::saveObject
|
||||
* @todo Implement testsaveObject().
|
||||
*/
|
||||
public function testsaveObject()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('saveObject', $methods ), 'exists method saveObject' );
|
||||
$r = new ReflectionMethod('Configurations', 'saveObject');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'object');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'cfg');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'obj');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'pro');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'usr');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[5]->getName() == 'app');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == true);
|
||||
$this->assertTrue( $params[5]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::loadObject
|
||||
* @todo Implement testloadObject().
|
||||
*/
|
||||
public function testloadObject()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('loadObject', $methods ), 'exists method loadObject' );
|
||||
$r = new ReflectionMethod('Configurations', 'loadObject');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'cfg');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'obj');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'pro');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'usr');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'app');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::getConfiguration
|
||||
* @todo Implement testgetConfiguration().
|
||||
*/
|
||||
public function testgetConfiguration()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getConfiguration', $methods ), 'exists method getConfiguration' );
|
||||
$r = new ReflectionMethod('Configurations', 'getConfiguration');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'cfg');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'obj');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'pro');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[3]->getName() == 'usr');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[4]->getName() == 'app');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::usersNameFormat
|
||||
* @todo Implement testusersNameFormat().
|
||||
*/
|
||||
public function testusersNameFormat()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('usersNameFormat', $methods ), 'exists method usersNameFormat' );
|
||||
$r = new ReflectionMethod('Configurations', 'usersNameFormat');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'username');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'firstname');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'lastname');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::getFormats
|
||||
* @todo Implement testgetFormats().
|
||||
*/
|
||||
public function testgetFormats()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getFormats', $methods ), 'exists method getFormats' );
|
||||
$r = new ReflectionMethod('Configurations', 'getFormats');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::setConfig
|
||||
* @todo Implement testsetConfig().
|
||||
*/
|
||||
public function testsetConfig()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setConfig', $methods ), 'exists method setConfig' );
|
||||
$r = new ReflectionMethod('Configurations', 'setConfig');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'route');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'object');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'to');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::getDateFormats
|
||||
* @todo Implement testgetDateFormats().
|
||||
*/
|
||||
public function testgetDateFormats()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDateFormats', $methods ), 'exists method getDateFormats' );
|
||||
$r = new ReflectionMethod('Configurations', 'getDateFormats');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::getUserNameFormats
|
||||
* @todo Implement testgetUserNameFormats().
|
||||
*/
|
||||
public function testgetUserNameFormats()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getUserNameFormats', $methods ), 'exists method getUserNameFormats' );
|
||||
$r = new ReflectionMethod('Configurations', 'getUserNameFormats');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::getSystemDate
|
||||
* @todo Implement testgetSystemDate().
|
||||
*/
|
||||
public function testgetSystemDate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getSystemDate', $methods ), 'exists method getSystemDate' );
|
||||
$r = new ReflectionMethod('Configurations', 'getSystemDate');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'dateTime');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Configurations::getEnvSetting
|
||||
* @todo Implement testgetEnvSetting().
|
||||
*/
|
||||
public function testgetEnvSetting()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getEnvSetting', $methods ), 'exists method getEnvSetting' );
|
||||
$r = new ReflectionMethod('Configurations', 'getEnvSetting');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'key');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'data');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,271 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.derivation.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:25.
|
||||
*/
|
||||
|
||||
class classDerivationTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Derivation
|
||||
*/
|
||||
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 Derivation();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('Derivation');
|
||||
$this->assertTrue(count($methods) == 14, count($methods));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Derivation::prepareInformation
|
||||
* @todo Implement testprepareInformation().
|
||||
*/
|
||||
public function testprepareInformation()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('prepareInformation', $methods ), 'exists method prepareInformation' );
|
||||
$r = new ReflectionMethod('Derivation', 'prepareInformation');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Derivation::getRouteCondition
|
||||
* @todo Implement testgetRouteCondition().
|
||||
*/
|
||||
public function testgetRouteCondition()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getRouteCondition', $methods ), 'exists method getRouteCondition' );
|
||||
$r = new ReflectionMethod('Derivation', 'getRouteCondition');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Derivation::GetAppParentIndex
|
||||
* @todo Implement testGetAppParentIndex().
|
||||
*/
|
||||
public function testGetAppParentIndex()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('GetAppParentIndex', $methods ), 'exists method GetAppParentIndex' );
|
||||
$r = new ReflectionMethod('Derivation', 'GetAppParentIndex');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Derivation::getAllUsersFromAnyTask
|
||||
* @todo Implement testgetAllUsersFromAnyTask().
|
||||
*/
|
||||
public function testgetAllUsersFromAnyTask()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAllUsersFromAnyTask', $methods ), 'exists method getAllUsersFromAnyTask' );
|
||||
$r = new ReflectionMethod('Derivation', 'getAllUsersFromAnyTask');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sTasUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Derivation::getUsersFullNameFromArray
|
||||
* @todo Implement testgetUsersFullNameFromArray().
|
||||
*/
|
||||
public function testgetUsersFullNameFromArray()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('getUsersFullNameFromArray', $methods), 'exists method getUsersFullNameFromArray');
|
||||
$r = new ReflectionMethod('Derivation', 'getUsersFullNameFromArray');
|
||||
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'aUsers');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Derivation::getNextAssignedUser
|
||||
* @todo Implement testgetNextAssignedUser().
|
||||
*/
|
||||
public function testgetNextAssignedUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getNextAssignedUser', $methods ), 'exists method getNextAssignedUser' );
|
||||
$r = new ReflectionMethod('Derivation', 'getNextAssignedUser');
|
||||
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'tasInfo');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Derivation::getDenpendentUser
|
||||
* @todo Implement testgetDenpendentUser().
|
||||
*/
|
||||
public function testgetDenpendentUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDenpendentUser', $methods ), 'exists method getDenpendentUser' );
|
||||
$r = new ReflectionMethod('Derivation', 'getDenpendentUser');
|
||||
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'USR_UID');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Derivation::setTasLastAssigned
|
||||
* @todo Implement testsetTasLastAssigned().
|
||||
*/
|
||||
public function testsetTasLastAssigned()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setTasLastAssigned', $methods ), 'exists method setTasLastAssigned' );
|
||||
$r = new ReflectionMethod('Derivation', 'setTasLastAssigned');
|
||||
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'tasUid');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'usrUid');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Derivation::derivate
|
||||
* @todo Implement testderivate().
|
||||
*/
|
||||
public function testderivate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('derivate', $methods ), 'exists method derivate' );
|
||||
$r = new ReflectionMethod('Derivation', 'derivate');
|
||||
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'currentDelegation');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == true);
|
||||
$this->assertTrue($params[0]->getDefaultValue() == array());
|
||||
$this->assertTrue($params[1]->getName() == 'nextDelegations');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == true);
|
||||
$this->assertTrue($params[1]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Derivation::doDerivation
|
||||
* @todo Implement testdoDerivation().
|
||||
*/
|
||||
public function testdoDerivation()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('doDerivation', $methods ), 'exists method doDerivation' );
|
||||
$r = new ReflectionMethod('Derivation', 'doDerivation');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'currentDelegation');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'nextDel');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'appFields');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'aSP');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Derivation::verifyIsCaseChild
|
||||
* @todo Implement testverifyIsCaseChild().
|
||||
*/
|
||||
public function testverifyIsCaseChild()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('verifyIsCaseChild', $methods ), 'exists method verifyIsCaseChild' );
|
||||
$r = new ReflectionMethod('Derivation', 'verifyIsCaseChild');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sApplicationUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Derivation::getDerivatedCases
|
||||
* @todo Implement testgetDerivatedCases().
|
||||
*/
|
||||
public function testgetDerivatedCases()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDerivatedCases', $methods ), 'exists method getDerivatedCases' );
|
||||
$r = new ReflectionMethod('Derivation', 'getDerivatedCases');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sParentUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sDelIndexParent');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Derivation::getGrpUser
|
||||
* @todo Implement testgetGrpUser().
|
||||
*/
|
||||
public function testgetGrpUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getGrpUser', $methods ), 'exists method getGrpUser' );
|
||||
$r = new ReflectionMethod('Derivation', 'getGrpUser');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'aData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,132 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.dynaFormField.php';
|
||||
require_once PATH_TRUNK . 'gulliver/system/class.error.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:30.
|
||||
*/
|
||||
class classDynaFormFieldTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @var DynaFormField
|
||||
*/
|
||||
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 DynaFormField();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('DynaFormField');
|
||||
$this->assertTrue(count($methods) == 15);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DynaFormField::SetTo
|
||||
* @todo Implement testSetTo().
|
||||
*/
|
||||
public function testSetTo()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('SetTo', $methods), 'exists method SetTo');
|
||||
$r = new ReflectionMethod('DynaFormField', 'SetTo');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'objConnection');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DynaFormField::Load
|
||||
* @todo Implement testLoad().
|
||||
*/
|
||||
public function testLoad()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('Load', $methods), 'exists method Load');
|
||||
$r = new ReflectionMethod('DynaFormField', 'Load');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'sUID');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DynaFormField::Delete
|
||||
* @todo Implement testDelete().
|
||||
*/
|
||||
public function testDelete()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('Delete', $methods), 'exists method Delete');
|
||||
$r = new ReflectionMethod('DynaFormField', 'Delete');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'uid');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DynaFormField::Save
|
||||
* @todo Implement testSave().
|
||||
*/
|
||||
public function testSave()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('Save', $methods), 'exists method Save');
|
||||
$r = new ReflectionMethod('DynaFormField', 'Save');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'Fields');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'labels');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == true);
|
||||
$this->assertTrue($params[1]->getDefaultValue() == array());
|
||||
$this->assertTrue($params[2]->getName() == 'options');
|
||||
$this->assertTrue($params[2]->isArray() == false);
|
||||
$this->assertTrue($params[2]->isOptional() == true);
|
||||
$this->assertTrue($params[2]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers DynaFormField::isNew
|
||||
* @todo Implement testisNew().
|
||||
*/
|
||||
public function testisNew()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('isNew', $methods), 'exists method isNew');
|
||||
$r = new ReflectionMethod('DynaFormField', 'isNew');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
@@ -1,441 +0,0 @@
|
||||
<?php
|
||||
require_once (PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.fieldValidator.php");
|
||||
|
||||
/**
|
||||
* Unit test for class FieldValidator
|
||||
*/
|
||||
class classFieldValidatorTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var FieldValidator
|
||||
*/
|
||||
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 FieldValidator();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('FieldValidator');
|
||||
$this->assertTrue( count($methods) == 7);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test all methods structure
|
||||
*/
|
||||
public function testAllMethodsStructure()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
|
||||
//isInt
|
||||
$this->assertTrue( in_array('isInt', $methods ), 'exists method isInt' );
|
||||
$r = new ReflectionMethod('FieldValidator', 'isInt');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'num');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
|
||||
//isReal
|
||||
$this->assertTrue( in_array('isReal', $methods ), 'exists method isReal' );
|
||||
$r = new ReflectionMethod('FieldValidator', 'isReal');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'num');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
|
||||
//isBool
|
||||
$this->assertTrue( in_array('isBool', $methods ), 'exists method isBool' );
|
||||
$r = new ReflectionMethod('FieldValidator', 'isBool');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'bool');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
|
||||
//isUrl
|
||||
$this->assertTrue( in_array('isUrl', $methods ), 'exists method isUrl' );
|
||||
$r = new ReflectionMethod('FieldValidator', 'isUrl');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'url');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
|
||||
//isEmail
|
||||
$this->assertTrue( in_array('isEmail', $methods ), 'exists method isEmail' );
|
||||
$r = new ReflectionMethod('FieldValidator', 'isEmail');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'email');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
|
||||
//isIp
|
||||
$this->assertTrue( in_array('isIp', $methods ), 'exists method isIp' );
|
||||
$r = new ReflectionMethod('FieldValidator', 'isIp');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'ip');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
|
||||
//validate
|
||||
$this->assertTrue( in_array('validate', $methods ), 'exists method validate' );
|
||||
$r = new ReflectionMethod('FieldValidator', 'validate');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'arrayData');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'arrayDataValidators');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FieldValidator::isInt
|
||||
*/
|
||||
public function testIsInt()
|
||||
{
|
||||
$this->assertTrue($this->object->isInt(0));
|
||||
$this->assertTrue($this->object->isInt("0"));
|
||||
$this->assertTrue($this->object->isInt(+0));
|
||||
$this->assertTrue($this->object->isInt("+0"));
|
||||
$this->assertTrue($this->object->isInt(-0));
|
||||
$this->assertTrue($this->object->isInt("-0"));
|
||||
|
||||
$this->assertTrue($this->object->isInt(55));
|
||||
$this->assertTrue($this->object->isInt("55"));
|
||||
$this->assertTrue($this->object->isInt(+55));
|
||||
$this->assertTrue($this->object->isInt("+55"));
|
||||
$this->assertTrue($this->object->isInt(-55));
|
||||
$this->assertTrue($this->object->isInt("-55"));
|
||||
|
||||
$this->assertFalse($this->object->isInt(""));
|
||||
|
||||
$this->assertFalse($this->object->isInt(55.5));
|
||||
$this->assertFalse($this->object->isInt("55.5"));
|
||||
$this->assertFalse($this->object->isInt(+55.5));
|
||||
$this->assertFalse($this->object->isInt("+55.5"));
|
||||
$this->assertFalse($this->object->isInt(-55.5));
|
||||
$this->assertFalse($this->object->isInt("-55.5"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FieldValidator::isReal
|
||||
*/
|
||||
public function testIsReal()
|
||||
{
|
||||
$this->assertTrue($this->object->isReal(0));
|
||||
$this->assertTrue($this->object->isReal("0"));
|
||||
$this->assertTrue($this->object->isReal(+0));
|
||||
$this->assertTrue($this->object->isReal("+0"));
|
||||
$this->assertTrue($this->object->isReal(-0));
|
||||
$this->assertTrue($this->object->isReal("-0"));
|
||||
|
||||
$this->assertTrue($this->object->isReal(55));
|
||||
$this->assertTrue($this->object->isReal("55"));
|
||||
$this->assertTrue($this->object->isReal(+55));
|
||||
$this->assertTrue($this->object->isReal("+55"));
|
||||
$this->assertTrue($this->object->isReal(-55));
|
||||
$this->assertTrue($this->object->isReal("-55"));
|
||||
|
||||
$this->assertTrue($this->object->isReal(55.5));
|
||||
$this->assertTrue($this->object->isReal("55.5"));
|
||||
$this->assertTrue($this->object->isReal(+55.5));
|
||||
$this->assertTrue($this->object->isReal("+55.5"));
|
||||
$this->assertTrue($this->object->isReal(-55.5));
|
||||
$this->assertTrue($this->object->isReal("-55.5"));
|
||||
|
||||
$this->assertFalse($this->object->isReal(""));
|
||||
|
||||
$this->assertFalse($this->object->isReal(".5"));
|
||||
$this->assertFalse($this->object->isReal("a"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FieldValidator::isBool
|
||||
*/
|
||||
public function testIsBool()
|
||||
{
|
||||
$this->assertTrue($this->object->isBool(true));
|
||||
$this->assertTrue($this->object->isBool(false));
|
||||
|
||||
$this->assertTrue($this->object->isBool("true"));
|
||||
$this->assertTrue($this->object->isBool("false"));
|
||||
|
||||
$this->assertFalse($this->object->isBool(""));
|
||||
|
||||
$this->assertFalse($this->object->isBool(1));
|
||||
$this->assertFalse($this->object->isBool(0));
|
||||
$this->assertFalse($this->object->isBool("1"));
|
||||
$this->assertFalse($this->object->isBool("0"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FieldValidator::isUrl
|
||||
*/
|
||||
public function testIsUrl()
|
||||
{
|
||||
$this->assertTrue($this->object->isUrl("http://www.myweb.com"));
|
||||
$this->assertTrue($this->object->isUrl("http://www.myweb.com/"));
|
||||
$this->assertTrue($this->object->isUrl("https://www.myweb.com"));
|
||||
$this->assertTrue($this->object->isUrl("https://www.myweb.com/"));
|
||||
$this->assertTrue($this->object->isUrl("https://www.myweb.com.bo"));
|
||||
$this->assertTrue($this->object->isUrl("https://myweb.com"));
|
||||
$this->assertTrue($this->object->isUrl("https://myweb.com.bo"));
|
||||
$this->assertTrue($this->object->isUrl("http://192.168.10.58"));
|
||||
$this->assertTrue($this->object->isUrl("https://192.168.10.58"));
|
||||
$this->assertTrue($this->object->isUrl("http://192.168.10.58:8080"));
|
||||
$this->assertTrue($this->object->isUrl("https://192.168.10.58:8080/"));
|
||||
$this->assertTrue($this->object->isUrl("http://www.myweb.com/project/01/activity/01/steps"));
|
||||
$this->assertTrue($this->object->isUrl("http://www.myweb.com/project/01/activity/01/steps.php"));
|
||||
|
||||
$this->assertFalse($this->object->isUrl(""));
|
||||
|
||||
$this->assertFalse($this->object->isUrl("www.myweb.com"));
|
||||
$this->assertFalse($this->object->isUrl("www.myweb.com.bo"));
|
||||
$this->assertFalse($this->object->isUrl("http ://www.myweb.com/"));
|
||||
$this->assertFalse($this->object->isUrl("http://myweb"));
|
||||
$this->assertFalse($this->object->isUrl("myweb"));
|
||||
$this->assertFalse($this->object->isUrl("192.168.10.58"));
|
||||
$this->assertFalse($this->object->isUrl("xttp://192.168.10.58"));
|
||||
$this->assertFalse($this->object->isUrl("http:://192.168.10.58:8080/"));
|
||||
$this->assertFalse($this->object->isUrl("http://"));
|
||||
$this->assertFalse($this->object->isUrl("https://"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FieldValidator::isEmail
|
||||
*/
|
||||
public function testIsEmail()
|
||||
{
|
||||
$this->assertTrue($this->object->isEmail("my-email@myweb.com"));
|
||||
$this->assertTrue($this->object->isEmail("my.email@myweb.com.bo"));
|
||||
$this->assertTrue($this->object->isEmail("my-email.sample@myweb.com"));
|
||||
$this->assertTrue($this->object->isEmail("my-email@my-web.com"));
|
||||
$this->assertTrue($this->object->isEmail("my-2013-email@my-web.com"));
|
||||
$this->assertTrue($this->object->isEmail("2013-my-email@my-web.com"));
|
||||
|
||||
$this->assertFalse($this->object->isEmail(""));
|
||||
|
||||
$this->assertFalse($this->object->isEmail(" @myweb.com"));
|
||||
$this->assertFalse($this->object->isEmail("my@email@myweb.com.bo"));
|
||||
$this->assertFalse($this->object->isEmail("my-2013-email"));
|
||||
$this->assertFalse($this->object->isEmail("my-email@myweb"));
|
||||
$this->assertFalse($this->object->isEmail(".@myweb.com"));
|
||||
$this->assertFalse($this->object->isEmail("-@myweb.com"));
|
||||
$this->assertFalse($this->object->isEmail("@myweb.com"));
|
||||
$this->assertFalse($this->object->isEmail("sample@.com"));
|
||||
$this->assertFalse($this->object->isEmail("sample.com"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FieldValidator::isIp
|
||||
*/
|
||||
public function testIsIp()
|
||||
{
|
||||
$this->assertTrue($this->object->isIp("255.255.255.255"));
|
||||
$this->assertTrue($this->object->isIp("0.0.0.0"));
|
||||
$this->assertTrue($this->object->isIp("127.0.0.1"));
|
||||
|
||||
$this->assertFalse($this->object->isIp(""));
|
||||
|
||||
$this->assertFalse($this->object->isIp("127.o.0.1"));
|
||||
$this->assertFalse($this->object->isIp("127.0.0."));
|
||||
$this->assertFalse($this->object->isIp("127.0.0"));
|
||||
$this->assertFalse($this->object->isIp(".0.0.1"));
|
||||
$this->assertFalse($this->object->isIp("127..0.1"));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FieldValidator::validate
|
||||
*/
|
||||
public function testValidate()
|
||||
{
|
||||
//Data OK
|
||||
$arrayField = array(
|
||||
"name" => "peter",
|
||||
"lastname" => "parker",
|
||||
"age" => 33,
|
||||
"weight" => 56.55,
|
||||
"website" => "http://www.myweb.com/",
|
||||
"email" => "spider-man@myweb.com",
|
||||
"alive" => true
|
||||
);
|
||||
|
||||
$arrayValidators = array(
|
||||
"name" => array(
|
||||
"type" => "string",
|
||||
"required" => true,
|
||||
"min_size" => 5
|
||||
),
|
||||
"lastname" => array(
|
||||
"type" => "string",
|
||||
"min_size" => 2
|
||||
),
|
||||
"age" => array(
|
||||
"type" => "int",
|
||||
"required" => true
|
||||
),
|
||||
"weight" => array(
|
||||
"type" => "real",
|
||||
"required" => true
|
||||
),
|
||||
"website" => array(
|
||||
"validation" => "url"
|
||||
),
|
||||
"email" => array(
|
||||
"type" => "string",
|
||||
"required" => false,
|
||||
"validation" => "email"
|
||||
),
|
||||
"alive" => array(
|
||||
"type" => "boolean"
|
||||
),
|
||||
"ip" => array(
|
||||
"validation" => "ip",
|
||||
"required" => false
|
||||
)
|
||||
);
|
||||
|
||||
$result = $this->object->validate($arrayField, $arrayValidators);
|
||||
|
||||
$expectedSuccess = true;
|
||||
$expectedErrors = array();
|
||||
|
||||
$this->assertEquals($result["success"], $expectedSuccess);
|
||||
$this->assertEquals($result["errors"], $expectedErrors);
|
||||
|
||||
//Data failed
|
||||
$arrayField = array(
|
||||
"name" => "Dan",
|
||||
"lastname" => "",
|
||||
"age" => "hello",
|
||||
"weight" => "",
|
||||
"website" => "www.myweb.com",
|
||||
"email" => "spider-man@myweb",
|
||||
"alive" => 1
|
||||
);
|
||||
|
||||
$arrayValidators = array(
|
||||
"name" => array(
|
||||
"type" => "string",
|
||||
"required" => true,
|
||||
"min_size" => 4
|
||||
),
|
||||
"lastname" => array(
|
||||
"type" => "string",
|
||||
"required" => true
|
||||
),
|
||||
"age" => array(
|
||||
"type" => "int"
|
||||
),
|
||||
"weight" => array(
|
||||
"type" => "real",
|
||||
"required" => true
|
||||
),
|
||||
"website" => array(
|
||||
"validation" => "url"
|
||||
),
|
||||
"email" => array(
|
||||
"type" => "string",
|
||||
"required" => false,
|
||||
"validation" => "email"
|
||||
),
|
||||
"alive" => array(
|
||||
"type" => "boolean"
|
||||
),
|
||||
"ip" => array(
|
||||
"validation" => "ip",
|
||||
"required" => false
|
||||
)
|
||||
);
|
||||
|
||||
$result = $this->object->validate($arrayField, $arrayValidators);
|
||||
|
||||
$expectedSuccess = false;
|
||||
$expectedErrors = array(
|
||||
"Field \"name\" should be min 4 chars, 3 given",
|
||||
"Field \"lastname\" is required",
|
||||
"Field \"age\" not is an integer number",
|
||||
"Field \"weight\" not is an real number",
|
||||
"Field \"weight\" is required",
|
||||
"Field \"website\" have not an valid URL format",
|
||||
"Field \"email\" have not an valid email format",
|
||||
"Field \"alive\" not is an boolean"
|
||||
);
|
||||
|
||||
$this->assertEquals($result["success"], $expectedSuccess);
|
||||
$this->assertEquals($result["errors"], $expectedErrors);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function dataProviderTestValidateExceptionCovers()
|
||||
{
|
||||
return array(
|
||||
array("", array(), false),
|
||||
array(array(), "", false),
|
||||
array(array(), array(1), false),
|
||||
array(array(1), array(), false)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FieldValidator::validate
|
||||
* @dataProvider dataProviderTestValidateExceptionCovers
|
||||
*/
|
||||
public function testValidateExceptionCovers($arrayData, $arrayDataValidators, $success)
|
||||
{
|
||||
$result = $this->object->validate($arrayData, $arrayDataValidators);
|
||||
|
||||
$this->assertEquals($result["success"], $success);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public function dataProviderTestValidateRemainingCovers()
|
||||
{
|
||||
return array(
|
||||
array(array("age" => 55.5), array("age" => array("type" => "int")), false),
|
||||
array(array("pi" => "3_1416"), array("pi" => array("type" => "real")), false),
|
||||
array(array("flag" => 1), array("flag" => array("type" => "bool")), false),
|
||||
array(array("name" => "peter"), array("name" => array("type" => "string")), true),
|
||||
|
||||
array(array("email" => "my--email@myweb.com"), array("email" => array("validation" => "email")), false),
|
||||
array(array("ip" => "127.0.0"), array("ip" => array("validation" => "ip")), false),
|
||||
|
||||
array(array("name" => "peter"), array("name" => array("min_size" => 6)), false),
|
||||
|
||||
array(array("name" => "peter"), array("firstname" => array("required" => true)), false)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FieldValidator::validate
|
||||
* @dataProvider dataProviderTestValidateRemainingCovers
|
||||
*/
|
||||
public function testValidateRemainingCovers($arrayData, $arrayDataValidators, $success)
|
||||
{
|
||||
$result = $this->object->validate($arrayData, $arrayDataValidators);
|
||||
|
||||
$this->assertEquals($result["success"], $success);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.fileCache.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:31.
|
||||
*/
|
||||
|
||||
class classFileCacheTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var FileCache
|
||||
*/
|
||||
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 FileCache(null);
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('FileCache');
|
||||
$this->assertTrue(count($methods) == 6);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FileCache::__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('FileCache', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'dir');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FileCache::get
|
||||
* @todo Implement testget().
|
||||
*/
|
||||
public function testget()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('get', $methods ), 'exists method get' );
|
||||
$r = new ReflectionMethod('FileCache', 'get');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'key');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'expiration');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '3600');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FileCache::set
|
||||
* @todo Implement testset().
|
||||
*/
|
||||
public function testset()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('set', $methods ), 'exists method set' );
|
||||
$r = new ReflectionMethod('FileCache', 'set');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'key');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'data');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers FileCache::clear
|
||||
* @todo Implement testclear().
|
||||
*/
|
||||
/*public function testclear()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('clear', $methods ), 'exists method clear' );
|
||||
$r = new ReflectionMethod('FileCache', 'clear');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'key');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}*/
|
||||
}
|
||||
|
||||
@@ -1,322 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.groups.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:25.
|
||||
*/
|
||||
|
||||
class classGroupsTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Groups
|
||||
*/
|
||||
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 Groups();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('Groups'); $this->assertTrue( count($methods) == 17);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getUsersOfGroup
|
||||
* @todo Implement testgetUsersOfGroup().
|
||||
*/
|
||||
public function testgetUsersOfGroup()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getUsersOfGroup', $methods ), 'exists method getUsersOfGroup' );
|
||||
$r = new ReflectionMethod('Groups', 'getUsersOfGroup');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sGroupUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getActiveGroupsForAnUser
|
||||
* @todo Implement testgetActiveGroupsForAnUser().
|
||||
*/
|
||||
public function testgetActiveGroupsForAnUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getActiveGroupsForAnUser', $methods ), 'exists method getActiveGroupsForAnUser' );
|
||||
$r = new ReflectionMethod('Groups', 'getActiveGroupsForAnUser');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::addUserToGroup
|
||||
* @todo Implement testaddUserToGroup().
|
||||
*/
|
||||
public function testaddUserToGroup()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addUserToGroup', $methods ), 'exists method addUserToGroup' );
|
||||
$r = new ReflectionMethod('Groups', 'addUserToGroup');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'GrpUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'UsrUid');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::removeUserOfGroup
|
||||
* @todo Implement testremoveUserOfGroup().
|
||||
*/
|
||||
public function testremoveUserOfGroup()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('removeUserOfGroup', $methods ), 'exists method removeUserOfGroup' );
|
||||
$r = new ReflectionMethod('Groups', 'removeUserOfGroup');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'GrpUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'UsrUid');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getAllGroups
|
||||
* @todo Implement testgetAllGroups().
|
||||
*/
|
||||
public function testgetAllGroups()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAllGroups', $methods ), 'exists method getAllGroups' );
|
||||
$r = new ReflectionMethod('Groups', 'getAllGroups');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getUserGroups
|
||||
* @todo Implement testgetUserGroups().
|
||||
*/
|
||||
public function testgetUserGroups()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getUserGroups', $methods ), 'exists method getUserGroups' );
|
||||
$r = new ReflectionMethod('Groups', 'getUserGroups');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getAvailableGroupsCriteria
|
||||
* @todo Implement testgetAvailableGroupsCriteria().
|
||||
*/
|
||||
public function testgetAvailableGroupsCriteria()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAvailableGroupsCriteria', $methods ), 'exists method getAvailableGroupsCriteria' );
|
||||
$r = new ReflectionMethod('Groups', 'getAvailableGroupsCriteria');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'filter');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getAssignedGroupsCriteria
|
||||
* @todo Implement testgetAssignedGroupsCriteria().
|
||||
*/
|
||||
public function testgetAssignedGroupsCriteria()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAssignedGroupsCriteria', $methods ), 'exists method getAssignedGroupsCriteria' );
|
||||
$r = new ReflectionMethod('Groups', 'getAssignedGroupsCriteria');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'filter');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getGroupsForUser
|
||||
* @todo Implement testgetGroupsForUser().
|
||||
*/
|
||||
public function testgetGroupsForUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getGroupsForUser', $methods ), 'exists method getGroupsForUser' );
|
||||
$r = new ReflectionMethod('Groups', 'getGroupsForUser');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'usrUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::removeUserOfAllGroups
|
||||
* @todo Implement testremoveUserOfAllGroups().
|
||||
*/
|
||||
public function testremoveUserOfAllGroups()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('removeUserOfAllGroups', $methods ), 'exists method removeUserOfAllGroups' );
|
||||
$r = new ReflectionMethod('Groups', 'removeUserOfAllGroups');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getUsersGroupCriteria
|
||||
* @todo Implement testgetUsersGroupCriteria().
|
||||
*/
|
||||
public function testgetUsersGroupCriteria()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getUsersGroupCriteria', $methods ), 'exists method getUsersGroupCriteria' );
|
||||
$r = new ReflectionMethod('Groups', 'getUsersGroupCriteria');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sGroupUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getUserGroupsCriteria
|
||||
* @todo Implement testgetUserGroupsCriteria().
|
||||
*/
|
||||
public function testgetUserGroupsCriteria()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getUserGroupsCriteria', $methods ), 'exists method getUserGroupsCriteria' );
|
||||
$r = new ReflectionMethod('Groups', 'getUserGroupsCriteria');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getNumberGroups
|
||||
* @todo Implement testgetNumberGroups().
|
||||
*/
|
||||
public function testgetNumberGroups()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getNumberGroups', $methods ), 'exists method getNumberGroups' );
|
||||
$r = new ReflectionMethod('Groups', 'getNumberGroups');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sUserUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::getAvailableUsersCriteria
|
||||
* @todo Implement testgetAvailableUsersCriteria().
|
||||
*/
|
||||
public function testgetAvailableUsersCriteria()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAvailableUsersCriteria', $methods ), 'exists method getAvailableUsersCriteria' );
|
||||
$r = new ReflectionMethod('Groups', 'getAvailableUsersCriteria');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sGroupUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::verifyUsertoGroup
|
||||
* @todo Implement testverifyUsertoGroup().
|
||||
*/
|
||||
public function testverifyUsertoGroup()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('verifyUsertoGroup', $methods ), 'exists method verifyUsertoGroup' );
|
||||
$r = new ReflectionMethod('Groups', 'verifyUsertoGroup');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'GrpUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'UsrUid');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::verifyGroup
|
||||
* @todo Implement testverifyGroup().
|
||||
*/
|
||||
public function testverifyGroup()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('verifyGroup', $methods ), 'exists method verifyGroup' );
|
||||
$r = new ReflectionMethod('Groups', 'verifyGroup');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sGroupUID');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Groups::load
|
||||
* @todo Implement testload().
|
||||
*/
|
||||
public function testload()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('load', $methods ), 'exists method load' );
|
||||
$r = new ReflectionMethod('Groups', 'load');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'GrpUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,231 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.Installer.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:31.
|
||||
*/
|
||||
|
||||
class classInstallerTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var Installer
|
||||
*/
|
||||
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 Installer();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('Installer');
|
||||
$this->assertTrue( count($methods) == 11);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Installer::__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('Installer', '__construct');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Installer::create_site
|
||||
* @todo Implement testcreate_site().
|
||||
*/
|
||||
public function testcreate_site()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('create_site', $methods ), 'exists method create_site' );
|
||||
$r = new ReflectionMethod('Installer', 'create_site');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'config');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == array());
|
||||
$this->assertTrue( $params[1]->getName() == 'confirmed');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Installer::isset_site
|
||||
* @todo Implement testisset_site().
|
||||
*/
|
||||
public function testisset_site()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('isset_site', $methods ), 'exists method isset_site' );
|
||||
$r = new ReflectionMethod('Installer', 'isset_site');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'name');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == 'workflow');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Installer::set_admin
|
||||
* @todo Implement testset_admin().
|
||||
*/
|
||||
public function testset_admin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('set_admin', $methods ), 'exists method set_admin' );
|
||||
$r = new ReflectionMethod('Installer', 'set_admin');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Installer::query_sql_file
|
||||
* @todo Implement testquery_sql_file().
|
||||
*/
|
||||
public function testquery_sql_file()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('query_sql_file', $methods ), 'exists method query_sql_file' );
|
||||
$r = new ReflectionMethod('Installer', 'query_sql_file');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'file');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'connection');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Installer::file_permisions
|
||||
* @todo Implement testfile_permisions().
|
||||
*/
|
||||
public function testfile_permisions()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('file_permisions', $methods ), 'exists method file_permisions' );
|
||||
$r = new ReflectionMethod('Installer', 'file_permisions');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'file');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'def');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '777');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Installer::is_dir_writable
|
||||
* @todo Implement testis_dir_writable().
|
||||
*/
|
||||
public function testis_dir_writable()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('is_dir_writable', $methods ), 'exists method is_dir_writable' );
|
||||
$r = new ReflectionMethod('Installer', 'is_dir_writable');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'dir');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Installer::getDirectoryFiles
|
||||
* @todo Implement testgetDirectoryFiles().
|
||||
*/
|
||||
public function testgetDirectoryFiles()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDirectoryFiles', $methods ), 'exists method getDirectoryFiles' );
|
||||
$r = new ReflectionMethod('Installer', 'getDirectoryFiles');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'dir');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'extension');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Installer::check_db_empty
|
||||
* @todo Implement testcheck_db_empty().
|
||||
*/
|
||||
public function testcheck_db_empty()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('check_db_empty', $methods ), 'exists method check_db_empty' );
|
||||
$r = new ReflectionMethod('Installer', 'check_db_empty');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'dbName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Installer::check_db
|
||||
* @todo Implement testcheck_db().
|
||||
*/
|
||||
public function testcheck_db()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('check_db', $methods ), 'exists method check_db' );
|
||||
$r = new ReflectionMethod('Installer', 'check_db');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'dbName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers Installer::log
|
||||
* @todo Implement testlog().
|
||||
*/
|
||||
public function testlog()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('log', $methods ), 'exists method log' );
|
||||
$r = new ReflectionMethod('Installer', 'log');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'text');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'failed');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.AppSolr.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:25.
|
||||
*/
|
||||
class classInvalidIndexSearchTextExceptionTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var InvalidIndexSearchTextException
|
||||
*/
|
||||
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 InvalidIndexSearchTextException('message');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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()
|
||||
{
|
||||
$class = new ReflectionClass('ApplicationWithoutDelegationRecordsException');
|
||||
$methods = $class->getMethods(ReflectionMethod::IS_PUBLIC);
|
||||
//$this->assertTrue( count($methods) == 9);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers InvalidIndexSearchTextException::__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('InvalidIndexSearchTextException', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'message');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'code');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '0');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers InvalidIndexSearchTextException::__toString
|
||||
* @todo Implement test__toString().
|
||||
*/
|
||||
public function test__toString()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__toString', $methods ), 'exists method __toString' );
|
||||
$r = new ReflectionMethod('InvalidIndexSearchTextException', '__toString');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,100 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.javaBridgePM.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
|
||||
*/
|
||||
|
||||
class classJavaBridgePMTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var JavaBridgePM
|
||||
*/
|
||||
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 JavaBridgePM();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('JavaBridgePM'); $this->assertTrue( count($methods) == 3);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers JavaBridgePM::checkJavaExtension
|
||||
* @todo Implement testcheckJavaExtension().
|
||||
*/
|
||||
public function testcheckJavaExtension()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('checkJavaExtension', $methods ), 'exists method checkJavaExtension' );
|
||||
$r = new ReflectionMethod('JavaBridgePM', 'checkJavaExtension');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers JavaBridgePM::convertValue
|
||||
* @todo Implement testconvertValue().
|
||||
*/
|
||||
public function testconvertValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('convertValue', $methods ), 'exists method convertValue' );
|
||||
$r = new ReflectionMethod('JavaBridgePM', 'convertValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'value');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'className');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers JavaBridgePM::generateJrxmlFromDynaform
|
||||
* @todo Implement testgenerateJrxmlFromDynaform().
|
||||
*/
|
||||
public function testgenerateJrxmlFromDynaform()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('generateJrxmlFromDynaform', $methods ), 'exists method generateJrxmlFromDynaform' );
|
||||
$r = new ReflectionMethod('JavaBridgePM', 'generateJrxmlFromDynaform');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'outDocUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'dynaformUid');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'template');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,261 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.net.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
|
||||
*/
|
||||
class classNETTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @var NET
|
||||
*/
|
||||
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 NET('192.168.11.21');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('NET');
|
||||
$this->assertTrue(count($methods) == 14);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::__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('NET', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'pHost');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::resolv
|
||||
* @todo Implement testresolv().
|
||||
*/
|
||||
public function testresolv()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('resolv', $methods), 'exists method resolv');
|
||||
$r = new ReflectionMethod('NET', 'resolv');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'pHost');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::scannPort
|
||||
* @todo Implement testscannPort().
|
||||
*/
|
||||
public function testscannPort()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('scannPort', $methods), 'exists method scannPort');
|
||||
$r = new ReflectionMethod('NET', 'scannPort');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'pPort');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::is_ipaddress
|
||||
* @todo Implement testis_ipaddress().
|
||||
*/
|
||||
public function testis_ipaddress()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('is_ipaddress', $methods), 'exists method is_ipaddress');
|
||||
$r = new ReflectionMethod('NET', 'is_ipaddress');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'pHost');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::ping
|
||||
* @todo Implement testping().
|
||||
*/
|
||||
public function testping()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('ping', $methods), 'exists method ping');
|
||||
$r = new ReflectionMethod('NET', 'ping');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'pTTL');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == true);
|
||||
$this->assertTrue($params[0]->getDefaultValue() == '3000');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::loginDbServer
|
||||
* @todo Implement testloginDbServer().
|
||||
*/
|
||||
public function testloginDbServer()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('loginDbServer', $methods), 'exists method loginDbServer');
|
||||
$r = new ReflectionMethod('NET', 'loginDbServer');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'pUser');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'pPasswd');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::setDataBase
|
||||
* @todo Implement testsetDataBase().
|
||||
*/
|
||||
public function testsetDataBase()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('setDataBase', $methods), 'exists method setDataBase');
|
||||
$r = new ReflectionMethod('NET', 'setDataBase');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'pDb');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'pPort');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == true);
|
||||
$this->assertTrue($params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::tryConnectServer
|
||||
* @todo Implement testtryConnectServer().
|
||||
*/
|
||||
public function testtryConnectServer()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('tryConnectServer', $methods), 'exists method tryConnectServer');
|
||||
$r = new ReflectionMethod('NET', 'tryConnectServer');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'pDbDriver');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::tryOpenDataBase
|
||||
* @todo Implement testtryOpenDataBase().
|
||||
*/
|
||||
public function testtryOpenDataBase()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('tryOpenDataBase', $methods), 'exists method tryOpenDataBase');
|
||||
$r = new ReflectionMethod('NET', 'tryOpenDataBase');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'pDbDriver');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::getDbServerVersion
|
||||
* @todo Implement testgetDbServerVersion().
|
||||
*/
|
||||
public function testgetDbServerVersion()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('getDbServerVersion', $methods), 'exists method getDbServerVersion');
|
||||
$r = new ReflectionMethod('NET', 'getDbServerVersion');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'driver');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::dbName
|
||||
* @todo Implement testdbName().
|
||||
*/
|
||||
public function testdbName()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('dbName', $methods), 'exists method dbName');
|
||||
$r = new ReflectionMethod('NET', 'dbName');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'pAdapter');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::showMsg
|
||||
* @todo Implement testshowMsg().
|
||||
*/
|
||||
public function testshowMsg()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('showMsg', $methods), 'exists method showMsg');
|
||||
$r = new ReflectionMethod('NET', 'showMsg');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::getErrno
|
||||
* @todo Implement testgetErrno().
|
||||
*/
|
||||
public function testgetErrno()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('getErrno', $methods), 'exists method getErrno');
|
||||
$r = new ReflectionMethod('NET', 'getErrno');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers NET::getErrmsg
|
||||
* @todo Implement testgetErrmsg().
|
||||
*/
|
||||
public function testgetErrmsg()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('getErrmsg', $methods), 'exists method getErrmsg');
|
||||
$r = new ReflectionMethod('NET', 'getErrmsg');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,97 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.processes.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:25.
|
||||
*/
|
||||
|
||||
class classObjectCellectionTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var ObjectCellection
|
||||
*/
|
||||
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 ObjectCellection();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('ObjectCellection'); $this->assertTrue( count($methods) == 3);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ObjectCellection::__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('ObjectCellection', '__construct');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ObjectCellection::add
|
||||
* @todo Implement testadd().
|
||||
*/
|
||||
public function testadd()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('add', $methods ), 'exists method add' );
|
||||
$r = new ReflectionMethod('ObjectCellection', 'add');
|
||||
$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() == 'type');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'data');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'origin');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ObjectCellection::get
|
||||
* @todo Implement testget().
|
||||
*/
|
||||
public function testget()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('get', $methods ), 'exists method get' );
|
||||
$r = new ReflectionMethod('ObjectCellection', 'get');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.processes.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:25.
|
||||
*/
|
||||
|
||||
class classObjectDocumentTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var ObjectDocument
|
||||
*/
|
||||
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 ObjectDocument();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('ObjectDocument'); $this->assertTrue( count($methods) == 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ObjectDocument::__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('ObjectDocument', '__construct');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,226 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.pmDashlet.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:31.
|
||||
*/
|
||||
|
||||
class classPMDashletTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var PMDashlet
|
||||
*/
|
||||
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 PMDashlet();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('PMDashlet'); $this->assertTrue( count($methods) == 58);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMDashlet::getAdditionalFields
|
||||
* @todo Implement testgetAdditionalFields().
|
||||
*/
|
||||
public function testgetAdditionalFields()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAdditionalFields', $methods ), 'exists method getAdditionalFields' );
|
||||
$r = new ReflectionMethod('PMDashlet', 'getAdditionalFields');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'className');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMDashlet::setup
|
||||
* @todo Implement testsetup().
|
||||
*/
|
||||
public function testsetup()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setup', $methods ), 'exists method setup' );
|
||||
$r = new ReflectionMethod('PMDashlet', 'setup');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'dasInsUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMDashlet::render
|
||||
* @todo Implement testrender().
|
||||
*/
|
||||
public function testrender()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
||||
$r = new ReflectionMethod('PMDashlet', 'render');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'width');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '300');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMDashlet::getDashletInstance
|
||||
* @todo Implement testgetDashletInstance().
|
||||
*/
|
||||
public function testgetDashletInstance()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDashletInstance', $methods ), 'exists method getDashletInstance' );
|
||||
$r = new ReflectionMethod('PMDashlet', 'getDashletInstance');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMDashlet::getDashletObject
|
||||
* @todo Implement testgetDashletObject().
|
||||
*/
|
||||
public function testgetDashletObject()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDashletObject', $methods ), 'exists method getDashletObject' );
|
||||
$r = new ReflectionMethod('PMDashlet', 'getDashletObject');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMDashlet::getDashletsInstances
|
||||
* @todo Implement testgetDashletsInstances().
|
||||
*/
|
||||
public function testgetDashletsInstances()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDashletsInstances', $methods ), 'exists method getDashletsInstances' );
|
||||
$r = new ReflectionMethod('PMDashlet', 'getDashletsInstances');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'start');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'limit');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMDashlet::getDashletsInstancesQuantity
|
||||
* @todo Implement testgetDashletsInstancesQuantity().
|
||||
*/
|
||||
/*public function testgetDashletsInstancesQuantity()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDashletsInstancesQuantity', $methods ), 'exists method getDashletsInstancesQuantity' );
|
||||
$r = new ReflectionMethod('PMDashlet', 'getDashletsInstancesQuantity');
|
||||
$params = $r->getParameters();
|
||||
}*/
|
||||
|
||||
/**
|
||||
* @covers PMDashlet::loadDashletInstance
|
||||
* @todo Implement testloadDashletInstance().
|
||||
*/
|
||||
public function testloadDashletInstance()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('loadDashletInstance', $methods ), 'exists method loadDashletInstance' );
|
||||
$r = new ReflectionMethod('PMDashlet', 'loadDashletInstance');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'dasInsUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMDashlet::saveDashletInstance
|
||||
* @todo Implement testsaveDashletInstance().
|
||||
*/
|
||||
public function testsaveDashletInstance()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('saveDashletInstance', $methods ), 'exists method saveDashletInstance' );
|
||||
$r = new ReflectionMethod('PMDashlet', 'saveDashletInstance');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'data');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMDashlet::deleteDashletInstance
|
||||
* @todo Implement testdeleteDashletInstance().
|
||||
*/
|
||||
public function testdeleteDashletInstance()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('deleteDashletInstance', $methods ), 'exists method deleteDashletInstance' );
|
||||
$r = new ReflectionMethod('PMDashlet', 'deleteDashletInstance');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'dasInsUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMDashlet::getDashletsInstancesForUser
|
||||
* @todo Implement testgetDashletsInstancesForUser().
|
||||
*/
|
||||
public function testgetDashletsInstancesForUser()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDashletsInstancesForUser', $methods ), 'exists method getDashletsInstancesForUser' );
|
||||
$r = new ReflectionMethod('PMDashlet', 'getDashletsInstancesForUser');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'userUid');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMDashlet::getXTemplate
|
||||
* @todo Implement testgetXTemplate().
|
||||
*/
|
||||
public function testgetXTemplate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getXTemplate', $methods ), 'exists method getXTemplate' );
|
||||
$r = new ReflectionMethod('PMDashlet', 'getXTemplate');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'className');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,955 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.pluginRegistry.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
|
||||
*/
|
||||
|
||||
class classPMPluginRegistryTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var PMPluginRegistry
|
||||
*/
|
||||
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 PMPluginRegistry();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('PMPluginRegistry');
|
||||
$this->assertTrue( count($methods) == 60, count($methods));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::__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('PMPluginRegistry', '__construct');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getSingleton
|
||||
* @todo Implement testgetSingleton().
|
||||
*/
|
||||
public function testgetSingleton()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getSingleton', $methods ), 'exists method getSingleton' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getSingleton');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::serializeInstance
|
||||
* @todo Implement testserializeInstance().
|
||||
*/
|
||||
public function testserializeInstance()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('serializeInstance', $methods ), 'exists method serializeInstance' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'serializeInstance');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::unSerializeInstance
|
||||
* @todo Implement testunSerializeInstance().
|
||||
*/
|
||||
public function testunSerializeInstance()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('unSerializeInstance', $methods ), 'exists method unSerializeInstance' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'unSerializeInstance');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'serialized');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::save
|
||||
* @todo Implement testsave().
|
||||
*/
|
||||
public function testsave()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('save', $methods ), 'exists method save' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'save');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerPlugin
|
||||
* @todo Implement testregisterPlugin().
|
||||
*/
|
||||
public function testregisterPlugin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerPlugin', $methods ), 'exists method registerPlugin' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerPlugin');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sFilename');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getPluginDetails
|
||||
* @todo Implement testgetPluginDetails().
|
||||
*/
|
||||
public function testgetPluginDetails()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getPluginDetails', $methods ), 'exists method getPluginDetails' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getPluginDetails');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sFilename');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::enablePlugin
|
||||
* @todo Implement testenablePlugin().
|
||||
*/
|
||||
public function testenablePlugin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('enablePlugin', $methods ), 'exists method enablePlugin' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'enablePlugin');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::disablePlugin
|
||||
* @todo Implement testdisablePlugin().
|
||||
*/
|
||||
public function testdisablePlugin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('disablePlugin', $methods ), 'exists method disablePlugin' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'disablePlugin');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'eventPlugin');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '1');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getStatusPlugin
|
||||
* @todo Implement testgetStatusPlugin().
|
||||
*/
|
||||
public function testgetStatusPlugin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getStatusPlugin', $methods ), 'exists method getStatusPlugin' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getStatusPlugin');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::installPluginArchive
|
||||
* @todo Implement testinstallPluginArchive().
|
||||
*/
|
||||
public function testinstallPluginArchive()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('installPluginArchive', $methods ), 'exists method installPluginArchive' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'installPluginArchive');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'filename');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'pluginName');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::uninstallPlugin
|
||||
* @todo Implement testuninstallPlugin().
|
||||
*/
|
||||
public function testuninstallPlugin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('uninstallPlugin', $methods ), 'exists method uninstallPlugin' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'uninstallPlugin');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::uninstallPluginWorkspaces
|
||||
* @todo Implement testuninstallPluginWorkspaces().
|
||||
*/
|
||||
public function testuninstallPluginWorkspaces()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('uninstallPluginWorkspaces', $methods ), 'exists method uninstallPluginWorkspaces' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'uninstallPluginWorkspaces');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'arrayPlugin');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::installPlugin
|
||||
* @todo Implement testinstallPlugin().
|
||||
*/
|
||||
public function testinstallPlugin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('installPlugin', $methods ), 'exists method installPlugin' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'installPlugin');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerMenu
|
||||
* @todo Implement testregisterMenu().
|
||||
*/
|
||||
public function testregisterMenu()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerMenu', $methods ), 'exists method registerMenu' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerMenu');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sMenuId');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'sFilename');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerDashlets
|
||||
* @todo Implement testregisterDashlets().
|
||||
*/
|
||||
public function testregisterDashlets()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerDashlets', $methods ), 'exists method registerDashlets' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerDashlets');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'namespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerCss
|
||||
* @todo Implement testregisterCss().
|
||||
*/
|
||||
public function testregisterCss()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerCss', $methods ), 'exists method registerCss' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerCss');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sCssFile');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getRegisteredCss
|
||||
* @todo Implement testgetRegisteredCss().
|
||||
*/
|
||||
public function testgetRegisteredCss()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getRegisteredCss', $methods ), 'exists method getRegisteredCss' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getRegisteredCss');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerJavascript
|
||||
* @todo Implement testregisterJavascript().
|
||||
*/
|
||||
public function testregisterJavascript()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerJavascript', $methods ), 'exists method registerJavascript' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerJavascript');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sCoreJsFile');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'pluginJsFile');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getRegisteredJavascript
|
||||
* @todo Implement testgetRegisteredJavascript().
|
||||
*/
|
||||
public function testgetRegisteredJavascript()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getRegisteredJavascript', $methods ), 'exists method getRegisteredJavascript' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getRegisteredJavascript');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getRegisteredJavascriptBy
|
||||
* @todo Implement testgetRegisteredJavascriptBy().
|
||||
*/
|
||||
public function testgetRegisteredJavascriptBy()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getRegisteredJavascriptBy', $methods ), 'exists method getRegisteredJavascriptBy' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getRegisteredJavascriptBy');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sCoreJsFile');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::unregisterJavascripts
|
||||
* @todo Implement testunregisterJavascripts().
|
||||
*/
|
||||
public function testunregisterJavascripts()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('unregisterJavascripts', $methods ), 'exists method unregisterJavascripts' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'unregisterJavascripts');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sCoreJsFile');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerReport
|
||||
* @todo Implement testregisterReport().
|
||||
*/
|
||||
public function testregisterReport()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerReport', $methods ), 'exists method registerReport' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerReport');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerPmFunction
|
||||
* @todo Implement testregisterPmFunction().
|
||||
*/
|
||||
public function testregisterPmFunction()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerPmFunction', $methods ), 'exists method registerPmFunction' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerPmFunction');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerRedirectLogin
|
||||
* @todo Implement testregisterRedirectLogin().
|
||||
*/
|
||||
public function testregisterRedirectLogin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerRedirectLogin', $methods ), 'exists method registerRedirectLogin' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerRedirectLogin');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sRole');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'sPathMethod');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerFolder
|
||||
* @todo Implement testregisterFolder().
|
||||
*/
|
||||
public function testregisterFolder()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerFolder', $methods ), 'exists method registerFolder' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerFolder');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sFolderId');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'sFolderName');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerStep
|
||||
* @todo Implement testregisterStep().
|
||||
*/
|
||||
public function testregisterStep()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerStep', $methods ), 'exists method registerStep' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerStep');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sStepId');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'sStepName');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'sStepTitle');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == false);
|
||||
$this->assertTrue( $params[4]->getName() == 'setupStepPage');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == true);
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::isRegisteredFolder
|
||||
* @todo Implement testisRegisteredFolder().
|
||||
*/
|
||||
public function testisRegisteredFolder()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('isRegisteredFolder', $methods ), 'exists method isRegisteredFolder' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'isRegisteredFolder');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sFolderName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getMenus
|
||||
* @todo Implement testgetMenus().
|
||||
*/
|
||||
public function testgetMenus()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getMenus', $methods ), 'exists method getMenus' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getMenus');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'menuId');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getDashlets
|
||||
* @todo Implement testgetDashlets().
|
||||
*/
|
||||
public function testgetDashlets()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDashlets', $methods ), 'exists method getDashlets' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getDashlets');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getReports
|
||||
* @todo Implement testgetReports().
|
||||
*/
|
||||
public function testgetReports()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getReports', $methods ), 'exists method getReports' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getReports');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getPmFunctions
|
||||
* @todo Implement testgetPmFunctions().
|
||||
*/
|
||||
public function testgetPmFunctions()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getPmFunctions', $methods ), 'exists method getPmFunctions' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getPmFunctions');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getSteps
|
||||
* @todo Implement testgetSteps().
|
||||
*/
|
||||
public function testgetSteps()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getSteps', $methods ), 'exists method getSteps' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getSteps');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getRedirectLogins
|
||||
* @todo Implement testgetRedirectLogins().
|
||||
*/
|
||||
public function testgetRedirectLogins()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getRedirectLogins', $methods ), 'exists method getRedirectLogins' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getRedirectLogins');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::executeTriggers
|
||||
* @todo Implement testexecuteTriggers().
|
||||
*/
|
||||
public function testexecuteTriggers()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('executeTriggers', $methods ), 'exists method executeTriggers' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'executeTriggers');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'triggerId');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'oData');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::existsTrigger
|
||||
* @todo Implement testexistsTrigger().
|
||||
*/
|
||||
public function testexistsTrigger()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('existsTrigger', $methods ), 'exists method existsTrigger' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'existsTrigger');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'triggerId');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getTriggerInfo
|
||||
* @todo Implement testgetTriggerInfo().
|
||||
*/
|
||||
public function testgetTriggerInfo()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getTriggerInfo', $methods ), 'exists method getTriggerInfo' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getTriggerInfo');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'triggerId');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerTrigger
|
||||
* @todo Implement testregisterTrigger().
|
||||
*/
|
||||
public function testregisterTrigger()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerTrigger', $methods ), 'exists method registerTrigger' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerTrigger');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sTriggerId');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'sTriggerName');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getPlugin
|
||||
* @todo Implement testgetPlugin().
|
||||
*/
|
||||
public function testgetPlugin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getPlugin', $methods ), 'exists method getPlugin' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getPlugin');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::setCompanyLogo
|
||||
* @todo Implement testsetCompanyLogo().
|
||||
*/
|
||||
public function testsetCompanyLogo()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setCompanyLogo', $methods ), 'exists method setCompanyLogo' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'setCompanyLogo');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'filename');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getCompanyLogo
|
||||
* @todo Implement testgetCompanyLogo().
|
||||
*/
|
||||
public function testgetCompanyLogo()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getCompanyLogo', $methods ), 'exists method getCompanyLogo' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getCompanyLogo');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'default');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::setupPlugins
|
||||
* @todo Implement testsetupPlugins().
|
||||
*/
|
||||
public function testsetupPlugins()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setupPlugins', $methods ), 'exists method setupPlugins' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'setupPlugins');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::executeMethod
|
||||
* @todo Implement testexecuteMethod().
|
||||
*/
|
||||
public function testexecuteMethod()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('executeMethod', $methods ), 'exists method executeMethod' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'executeMethod');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'methodName');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'oData');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getFieldsForPageSetup
|
||||
* @todo Implement testgetFieldsForPageSetup().
|
||||
*/
|
||||
public function testgetFieldsForPageSetup()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getFieldsForPageSetup', $methods ), 'exists method getFieldsForPageSetup' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getFieldsForPageSetup');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::updateFieldsForPageSetup
|
||||
* @todo Implement testupdateFieldsForPageSetup().
|
||||
*/
|
||||
public function testupdateFieldsForPageSetup()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('updateFieldsForPageSetup', $methods ), 'exists method updateFieldsForPageSetup' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'updateFieldsForPageSetup');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'oData');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::eevalidate
|
||||
* @todo Implement testeevalidate().
|
||||
*/
|
||||
public function testeevalidate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('eevalidate', $methods ), 'exists method eevalidate' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'eevalidate');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerToolbarFile
|
||||
* @todo Implement testregisterToolbarFile().
|
||||
*/
|
||||
public function testregisterToolbarFile()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerToolbarFile', $methods ), 'exists method registerToolbarFile' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerToolbarFile');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sToolbarId');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'sFilename');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getToolbarOptions
|
||||
* @todo Implement testgetToolbarOptions().
|
||||
*/
|
||||
public function testgetToolbarOptions()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getToolbarOptions', $methods ), 'exists method getToolbarOptions' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getToolbarOptions');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sToolbarId');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerCaseSchedulerPlugin
|
||||
* @todo Implement testregisterCaseSchedulerPlugin().
|
||||
*/
|
||||
public function testregisterCaseSchedulerPlugin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerCaseSchedulerPlugin', $methods ), 'exists method registerCaseSchedulerPlugin' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerCaseSchedulerPlugin');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sActionId');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'sActionForm');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'sActionSave');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == false);
|
||||
$this->assertTrue( $params[4]->getName() == 'sActionExecute');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == false);
|
||||
$this->assertTrue( $params[5]->getName() == 'sActionGetFields');
|
||||
$this->assertTrue( $params[5]->isArray() == false);
|
||||
$this->assertTrue( $params[5]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getCaseSchedulerPlugins
|
||||
* @todo Implement testgetCaseSchedulerPlugins().
|
||||
*/
|
||||
public function testgetCaseSchedulerPlugins()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getCaseSchedulerPlugins', $methods ), 'exists method getCaseSchedulerPlugins' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getCaseSchedulerPlugins');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerTaskExtendedProperty
|
||||
* @todo Implement testregisterTaskExtendedProperty().
|
||||
*/
|
||||
public function testregisterTaskExtendedProperty()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerTaskExtendedProperty', $methods ), 'exists method registerTaskExtendedProperty' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerTaskExtendedProperty');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sPage');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'sName');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'sIcon');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerDashboardPage
|
||||
* @todo Implement testregisterDashboardPage().
|
||||
*/
|
||||
public function testregisterDashboardPage()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerDashboardPage', $methods ), 'exists method registerDashboardPage' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerDashboardPage');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sPage');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'sName');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'sIcon');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getDashboardPages
|
||||
* @todo Implement testgetDashboardPages().
|
||||
*/
|
||||
public function testgetDashboardPages()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDashboardPages', $methods ), 'exists method getDashboardPages' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getDashboardPages');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getTaskExtendedProperties
|
||||
* @todo Implement testgetTaskExtendedProperties().
|
||||
*/
|
||||
public function testgetTaskExtendedProperties()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getTaskExtendedProperties', $methods ), 'exists method getTaskExtendedProperties' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getTaskExtendedProperties');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::registerDashboard
|
||||
* @todo Implement testregisterDashboard().
|
||||
*/
|
||||
public function testregisterDashboard()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('registerDashboard', $methods ), 'exists method registerDashboard' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'registerDashboard');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPluginRegistry::getAttributes
|
||||
* @todo Implement testgetAttributes().
|
||||
*/
|
||||
public function testgetAttributes()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getAttributes', $methods ), 'exists method getAttributes' );
|
||||
$r = new ReflectionMethod('PMPluginRegistry', 'getAttributes');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,452 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.plugin.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
|
||||
*/
|
||||
class classPMPluginTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @var PMPlugin
|
||||
*/
|
||||
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 PMPlugin('sNamespace', 'sFilename');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('PMPlugin');
|
||||
$this->assertTrue(count($methods) == 24, count($methods));
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::PMPlugin
|
||||
* @todo Implement testPMPlugin().
|
||||
*/
|
||||
public function testPMPlugin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('PMPlugin', $methods), 'exists method PMPlugin');
|
||||
$r = new ReflectionMethod('PMPlugin', 'PMPlugin');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'sNamespace');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'sFilename');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == true);
|
||||
$this->assertTrue($params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::registerMenu
|
||||
* @todo Implement testregisterMenu().
|
||||
*/
|
||||
public function testregisterMenu()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('registerMenu', $methods), 'exists method registerMenu');
|
||||
$r = new ReflectionMethod('PMPlugin', 'registerMenu');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'menuId');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'menuFilename');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::registerDashlets
|
||||
* @todo Implement testregisterDashlets().
|
||||
*/
|
||||
public function testregisterDashlets()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('registerDashlets', $methods), 'exists method registerDashlets');
|
||||
$r = new ReflectionMethod('PMPlugin', 'registerDashlets');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::registerReport
|
||||
* @todo Implement testregisterReport().
|
||||
*/
|
||||
public function testregisterReport()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('registerReport', $methods), 'exists method registerReport');
|
||||
$r = new ReflectionMethod('PMPlugin', 'registerReport');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::registerPmFunction
|
||||
* @todo Implement testregisterPmFunction().
|
||||
*/
|
||||
public function testregisterPmFunction()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('registerPmFunction', $methods), 'exists method registerPmFunction');
|
||||
$r = new ReflectionMethod('PMPlugin', 'registerPmFunction');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::setCompanyLogo
|
||||
* @todo Implement testsetCompanyLogo().
|
||||
*/
|
||||
public function testsetCompanyLogo()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('setCompanyLogo', $methods), 'exists method setCompanyLogo');
|
||||
$r = new ReflectionMethod('PMPlugin', 'setCompanyLogo');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'filename');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::redirectLogin
|
||||
* @todo Implement testredirectLogin().
|
||||
*/
|
||||
public function testredirectLogin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('redirectLogin', $methods), 'exists method redirectLogin');
|
||||
$r = new ReflectionMethod('PMPlugin', 'redirectLogin');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'role');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'pathMethod');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::registerFolder
|
||||
* @todo Implement testregisterFolder().
|
||||
*/
|
||||
public function testregisterFolder()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('registerFolder', $methods), 'exists method registerFolder');
|
||||
$r = new ReflectionMethod('PMPlugin', 'registerFolder');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'sFolderId');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'sFolderName');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::registerStep
|
||||
* @todo Implement testregisterStep().
|
||||
*/
|
||||
public function testregisterStep()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('registerStep', $methods), 'exists method registerStep');
|
||||
$r = new ReflectionMethod('PMPlugin', 'registerStep');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'sStepId');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'sStepName');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
$this->assertTrue($params[2]->getName() == 'sStepTitle');
|
||||
$this->assertTrue($params[2]->isArray() == false);
|
||||
$this->assertTrue($params[2]->isOptional() == false);
|
||||
$this->assertTrue($params[3]->getName() == 'sSetupStepPage');
|
||||
$this->assertTrue($params[3]->isArray() == false);
|
||||
$this->assertTrue($params[3]->isOptional() == true);
|
||||
$this->assertTrue($params[3]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::registerTrigger
|
||||
* @todo Implement testregisterTrigger().
|
||||
*/
|
||||
public function testregisterTrigger()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('registerTrigger', $methods), 'exists method registerTrigger');
|
||||
$r = new ReflectionMethod('PMPlugin', 'registerTrigger');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'sTriggerId');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'sTriggerName');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::delete
|
||||
* @todo Implement testdelete().
|
||||
*/
|
||||
public function testdelete()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('delete', $methods), 'exists method delete');
|
||||
$r = new ReflectionMethod('PMPlugin', 'delete');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'sFilename');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'bAbsolutePath');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == true);
|
||||
$this->assertTrue($params[1]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::copy
|
||||
* @todo Implement testcopy().
|
||||
*/
|
||||
public function testcopy()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('copy', $methods), 'exists method copy');
|
||||
$r = new ReflectionMethod('PMPlugin', 'copy');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'sSouce');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'sTarget');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
$this->assertTrue($params[2]->getName() == 'bSourceAbsolutePath');
|
||||
$this->assertTrue($params[2]->isArray() == false);
|
||||
$this->assertTrue($params[2]->isOptional() == true);
|
||||
$this->assertTrue($params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue($params[3]->getName() == 'bTargetAbsolutePath');
|
||||
$this->assertTrue($params[3]->isArray() == false);
|
||||
$this->assertTrue($params[3]->isOptional() == true);
|
||||
$this->assertTrue($params[3]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::rename
|
||||
* @todo Implement testrename().
|
||||
*/
|
||||
public function testrename()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('rename', $methods), 'exists method rename');
|
||||
$r = new ReflectionMethod('PMPlugin', 'rename');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'sSouce');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'sTarget');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
$this->assertTrue($params[2]->getName() == 'bSourceAbsolutePath');
|
||||
$this->assertTrue($params[2]->isArray() == false);
|
||||
$this->assertTrue($params[2]->isOptional() == true);
|
||||
$this->assertTrue($params[2]->getDefaultValue() == '');
|
||||
$this->assertTrue($params[3]->getName() == 'bTargetAbsolutePath');
|
||||
$this->assertTrue($params[3]->isArray() == false);
|
||||
$this->assertTrue($params[3]->isOptional() == true);
|
||||
$this->assertTrue($params[3]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::registerBreakPageTemplate
|
||||
* @todo Implement testregisterBreakPageTemplate().
|
||||
*/
|
||||
public function testregisterBreakPageTemplate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('registerBreakPageTemplate', $methods), 'exists method registerBreakPageTemplate');
|
||||
$r = new ReflectionMethod('PMPlugin', 'registerBreakPageTemplate');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'pageId');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'templateFilename');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::registerCss
|
||||
* @todo Implement testregisterCss().
|
||||
*/
|
||||
public function testregisterCss()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('registerCss', $methods), 'exists method registerCss');
|
||||
$r = new ReflectionMethod('PMPlugin', 'registerCss');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'sCssFile');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::registerToolbarFile
|
||||
* @todo Implement testregisterToolbarFile().
|
||||
*/
|
||||
public function testregisterToolbarFile()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('registerToolbarFile', $methods), 'exists method registerToolbarFile');
|
||||
$r = new ReflectionMethod('PMPlugin', 'registerToolbarFile');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'sToolbarId');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'filename');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::registerCaseSchedulerPlugin
|
||||
* @todo Implement testregisterCaseSchedulerPlugin().
|
||||
*/
|
||||
public function testregisterCaseSchedulerPlugin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('registerCaseSchedulerPlugin', $methods),
|
||||
'exists method registerCaseSchedulerPlugin');
|
||||
$r = new ReflectionMethod('PMPlugin', 'registerCaseSchedulerPlugin');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'sActionId');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'sActionForm');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
$this->assertTrue($params[2]->getName() == 'sActionSave');
|
||||
$this->assertTrue($params[2]->isArray() == false);
|
||||
$this->assertTrue($params[2]->isOptional() == false);
|
||||
$this->assertTrue($params[3]->getName() == 'sActionExecute');
|
||||
$this->assertTrue($params[3]->isArray() == false);
|
||||
$this->assertTrue($params[3]->isOptional() == false);
|
||||
$this->assertTrue($params[4]->getName() == 'sActionGetFields');
|
||||
$this->assertTrue($params[4]->isArray() == false);
|
||||
$this->assertTrue($params[4]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::registerTaskExtendedProperty
|
||||
* @todo Implement testregisterTaskExtendedProperty().
|
||||
*/
|
||||
public function testregisterTaskExtendedProperty()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('registerTaskExtendedProperty', $methods),
|
||||
'exists method registerTaskExtendedProperty');
|
||||
$r = new ReflectionMethod('PMPlugin', 'registerTaskExtendedProperty');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'sPage');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'sName');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
$this->assertTrue($params[2]->getName() == 'sIcon');
|
||||
$this->assertTrue($params[2]->isArray() == false);
|
||||
$this->assertTrue($params[2]->isOptional() == true);
|
||||
$this->assertTrue($params[2]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::registerJavascript
|
||||
* @todo Implement testregisterJavascript().
|
||||
*/
|
||||
public function testregisterJavascript()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('registerJavascript', $methods), 'exists method registerJavascript');
|
||||
$r = new ReflectionMethod('PMPlugin', 'registerJavascript');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'sCoreJsFile');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'pluginJsFile');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::unregisterJavascript
|
||||
* @todo Implement testunregisterJavascript().
|
||||
*/
|
||||
public function testunregisterJavascript()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('unregisterJavascript', $methods), 'exists method unregisterJavascript');
|
||||
$r = new ReflectionMethod('PMPlugin', 'unregisterJavascript');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'sCoreJsFile');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'pluginJsFile');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::registerDashboard
|
||||
* @todo Implement testregisterDashboard().
|
||||
*/
|
||||
public function testregisterDashboard()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('registerDashboard', $methods), 'exists method registerDashboard');
|
||||
$r = new ReflectionMethod('PMPlugin', 'registerDashboard');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMPlugin::getExternalStepAction
|
||||
* @todo Implement testgetExternalStepAction().
|
||||
*/
|
||||
public function testgetExternalStepAction()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue(in_array('getExternalStepAction', $methods), 'exists method getExternalStepAction');
|
||||
$r = new ReflectionMethod('PMPlugin', 'getExternalStepAction');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,151 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.pmScript.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
|
||||
*/
|
||||
|
||||
class classPMScriptTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var PMScript
|
||||
*/
|
||||
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 PMScript();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('PMScript');
|
||||
$this->assertTrue(count($methods) == 7);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMScript::PMScript
|
||||
* @todo Implement testPMScript().
|
||||
*/
|
||||
public function testPMScript()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('PMScript', $methods ), 'exists method PMScript' );
|
||||
$r = new ReflectionMethod('PMScript', 'PMScript');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMScript::setFields
|
||||
* @todo Implement testsetFields().
|
||||
*/
|
||||
public function testsetFields()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setFields', $methods ), 'exists method setFields' );
|
||||
$r = new ReflectionMethod('PMScript', 'setFields');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue($params[0]->getName() == 'aFields');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional () == true);
|
||||
$this->assertTrue($params[0]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMScript::setScript
|
||||
* @todo Implement testsetScript().
|
||||
*/
|
||||
public function testsetScript()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setScript', $methods ), 'exists method setScript' );
|
||||
$r = new ReflectionMethod('PMScript', 'setScript');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sScript');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMScript::validSyntax
|
||||
* @todo Implement testvalidSyntax().
|
||||
*/
|
||||
public function testvalidSyntax()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('validSyntax', $methods ), 'exists method validSyntax' );
|
||||
$r = new ReflectionMethod('PMScript', 'validSyntax');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sScript');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMScript::executeAndCatchErrors
|
||||
* @todo Implement testexecuteAndCatchErrors().
|
||||
*/
|
||||
public function testexecuteAndCatchErrors()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('executeAndCatchErrors', $methods ), 'exists method executeAndCatchErrors' );
|
||||
$r = new ReflectionMethod('PMScript', 'executeAndCatchErrors');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sScript');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'sCode');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMScript::execute
|
||||
* @todo Implement testexecute().
|
||||
*/
|
||||
public function testexecute()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('execute', $methods ), 'exists method execute' );
|
||||
$r = new ReflectionMethod('PMScript', 'execute');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMScript::evaluate
|
||||
* @todo Implement testevaluate().
|
||||
*/
|
||||
public function testevaluate()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('evaluate', $methods ), 'exists method evaluate' );
|
||||
$r = new ReflectionMethod('PMScript', 'evaluate');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,228 +0,0 @@
|
||||
<?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 . 'workflow/engine/classes/class.memcached.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:30.
|
||||
*/
|
||||
|
||||
class classPMmemcachedTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var PMmemcached
|
||||
*/
|
||||
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 PMmemcached('workflow');
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('PMmemcached');
|
||||
$this->assertTrue( count($methods) == 12);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::__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('PMmemcached', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::getSingleton
|
||||
* @todo Implement testgetSingleton().
|
||||
*/
|
||||
public function testgetSingleton()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getSingleton', $methods ), 'exists method getSingleton' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'getSingleton');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::__clone
|
||||
* @todo Implement test__clone().
|
||||
*/
|
||||
public function test__clone()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__clone', $methods ), 'exists method __clone' );
|
||||
$r = new ReflectionMethod('PMmemcached', '__clone');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::__wakeup
|
||||
* @todo Implement test__wakeup().
|
||||
*/
|
||||
public function test__wakeup()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__wakeup', $methods ), 'exists method __wakeup' );
|
||||
$r = new ReflectionMethod('PMmemcached', '__wakeup');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::set
|
||||
* @todo Implement testset().
|
||||
*/
|
||||
public function testset()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('set', $methods ), 'exists method set' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'set');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'key');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'object');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'timeout');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '0');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::get
|
||||
* @todo Implement testget().
|
||||
*/
|
||||
public function testget()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('get', $methods ), 'exists method get' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'get');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'key');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::add
|
||||
* @todo Implement testadd().
|
||||
*/
|
||||
public function testadd()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('add', $methods ), 'exists method add' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'add');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'key');
|
||||
$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 PMmemcached::increment
|
||||
* @todo Implement testincrement().
|
||||
*/
|
||||
public function testincrement()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('increment', $methods ), 'exists method increment' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'increment');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'key');
|
||||
$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 PMmemcached::delete
|
||||
* @todo Implement testdelete().
|
||||
*/
|
||||
public function testdelete()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('delete', $methods ), 'exists method delete' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'delete');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'key');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::flush
|
||||
* @todo Implement testflush().
|
||||
*/
|
||||
public function testflush()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('flush', $methods ), 'exists method flush' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'flush');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::getStats
|
||||
* @todo Implement testgetStats().
|
||||
*/
|
||||
public function testgetStats()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getStats', $methods ), 'exists method getStats' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'getStats');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::printDetails
|
||||
* @todo Implement testprintDetails().
|
||||
*/
|
||||
public function testprintDetails()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printDetails', $methods ), 'exists method printDetails' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'printDetails');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user