HOR-1088
This commit is contained in:
@@ -1,185 +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.testTools.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classtestToolsTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var testTools
|
||||
*/
|
||||
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 testTools();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('testTools'); $this->assertTrue( count($methods) == 7);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers testTools::importDB
|
||||
* @todo Implement testimportDB().
|
||||
*/
|
||||
public function testimportDB()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('importDB', $methods ), 'exists method importDB' );
|
||||
$r = new ReflectionMethod('testTools', 'importDB');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'host');
|
||||
$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() == 'password');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'database');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == false);
|
||||
$this->assertTrue( $params[4]->getName() == 'importFile');
|
||||
$this->assertTrue( $params[4]->isArray() == false);
|
||||
$this->assertTrue( $params[4]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers testTools::importLocalDB
|
||||
* @todo Implement testimportLocalDB().
|
||||
*/
|
||||
public function testimportLocalDB()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('importLocalDB', $methods ), 'exists method importLocalDB' );
|
||||
$r = new ReflectionMethod('testTools', 'importLocalDB');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'importFile');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers testTools::callMethod
|
||||
* @todo Implement testcallMethod().
|
||||
*/
|
||||
public function testcallMethod()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('callMethod', $methods ), 'exists method callMethod' );
|
||||
$r = new ReflectionMethod('testTools', 'callMethod');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'methodFile');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'GET');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'POST');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue( $params[3]->getName() == 'SESSION');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers testTools::arrayAppend
|
||||
* @todo Implement testarrayAppend().
|
||||
*/
|
||||
public function testarrayAppend()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('arrayAppend', $methods ), 'exists method arrayAppend' );
|
||||
$r = new ReflectionMethod('testTools', 'arrayAppend');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'to');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'appendFrom');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers testTools::arrayDelete
|
||||
* @todo Implement testarrayDelete().
|
||||
*/
|
||||
public function testarrayDelete()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('arrayDelete', $methods ), 'exists method arrayDelete' );
|
||||
$r = new ReflectionMethod('testTools', 'arrayDelete');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'array');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers testTools::replaceVariables
|
||||
* @todo Implement testreplaceVariables().
|
||||
*/
|
||||
public function testreplaceVariables()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('replaceVariables', $methods ), 'exists method replaceVariables' );
|
||||
$r = new ReflectionMethod('testTools', 'replaceVariables');
|
||||
$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() == 'ExternalVariables');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == Array());
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers testTools::findValue
|
||||
* @todo Implement testfindValue().
|
||||
*/
|
||||
public function testfindValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('findValue', $methods ), 'exists method findValue' );
|
||||
$r = new ReflectionMethod('testTools', 'findValue');
|
||||
$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() == 'obj');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,223 +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.ymlDomain.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classymlDomainTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var ymlDomain
|
||||
*/
|
||||
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 ymlDomain();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('ymlDomain'); $this->assertTrue( count($methods) == 11);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ymlDomain::ymlDomain
|
||||
* @todo Implement testymlDomain().
|
||||
*/
|
||||
public function testymlDomain()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('ymlDomain', $methods ), 'exists method ymlDomain' );
|
||||
$r = new ReflectionMethod('ymlDomain', 'ymlDomain');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ymlDomain::addDomain
|
||||
* @todo Implement testaddDomain().
|
||||
*/
|
||||
public function testaddDomain()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addDomain', $methods ), 'exists method addDomain' );
|
||||
$r = new ReflectionMethod('ymlDomain', 'addDomain');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'domainName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ymlDomain::addDomainValue
|
||||
* @todo Implement testaddDomainValue().
|
||||
*/
|
||||
public function testaddDomainValue()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addDomainValue', $methods ), 'exists method addDomainValue' );
|
||||
$r = new ReflectionMethod('ymlDomain', 'addDomainValue');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'domainName');
|
||||
$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 ymlDomain::exists
|
||||
* @todo Implement testexists().
|
||||
*/
|
||||
public function testexists()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('exists', $methods ), 'exists method exists' );
|
||||
$r = new ReflectionMethod('ymlDomain', 'exists');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'domainName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ymlDomain::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('ymlDomain', 'get');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'resource');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ymlDomain::name2keys
|
||||
* @todo Implement testname2keys().
|
||||
*/
|
||||
public function testname2keys()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('name2keys', $methods ), 'exists method name2keys' );
|
||||
$r = new ReflectionMethod('ymlDomain', 'name2keys');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'resource');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ymlDomain::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('ymlDomain', 'load');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'resource');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ymlDomain::find
|
||||
* @todo Implement testfind().
|
||||
*/
|
||||
public function testfind()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('find', $methods ), 'exists method find' );
|
||||
$r = new ReflectionMethod('ymlDomain', 'find');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'nodesKey');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'where');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ymlDomain::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('ymlDomain', 'getNode');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'nodeKey');
|
||||
$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 ymlDomain::plainArray
|
||||
* @todo Implement testplainArray().
|
||||
*/
|
||||
public function testplainArray()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('plainArray', $methods ), 'exists method plainArray' );
|
||||
$r = new ReflectionMethod('ymlDomain', 'plainArray');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'array');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers ymlDomain::arrayAppend
|
||||
* @todo Implement testarrayAppend().
|
||||
*/
|
||||
public function testarrayAppend()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('arrayAppend', $methods ), 'exists method arrayAppend' );
|
||||
$r = new ReflectionMethod('ymlDomain', 'arrayAppend');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'to');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'appendFrom');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user