php units for all classes

This commit is contained in:
Fernando Ontiveros
2012-07-12 20:40:06 -04:00
parent 6326cfdf53
commit dd88abc53b
178 changed files with 28951 additions and 14669 deletions

View File

@@ -1,195 +1,164 @@
<?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/thirdparty/propel/Propel.php' ;
require_once PATH_TRUNK . 'gulliver/thirdparty/creole/Creole.php' ;
require_once PATH_TRUNK . 'workflow/engine/classes/class.pmScript.php';
<?php
require_once PATH_TRUNK . 'gulliver/thirdparty/smarty/libs/Smarty.class.php';
require_once PATH_TRUNK . 'gulliver/system/class.xmlform.php';
require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php';
require_once PATH_TRUNK . 'gulliver/system/class.form.php';
require_once PATH_TRUNK . 'gulliver/system/class.dbconnection.php';
require_once PATH_TRUNK . 'gulliver/thirdparty/propel/Propel.php';
require_once PATH_TRUNK . 'gulliver/thirdparty/creole/Creole.php';
require_once PATH_TRUNK . 'gulliver/thirdparty/pear/PEAR.php';
require_once PATH_TRUNK . 'workflow/engine/classes/class.pmScript.php';
/**
* Generated by ProcessMaker Test Unit Generator on 2012-05-10 at 20:56:18.
*/
/**
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 20:28:39.
*/
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()
{
$this->assertTrue( count($methods) == 7);
}
class classPMScriptTest extends PHPUnit_Framework_TestCase
{
/**
* @covers PMScript::PMScript
* @todo Implement testPMScript().
*/
public function testPMScript()
{
if (class_exists('PMScript')) {
$methods = get_class_methods( 'PMScript');
$this->assertTrue( in_array( 'PMScript', $methods ), 'seems like this function is outside this class' );
}
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();
$this->markTestIncomplete('This test has not been implemented yet.');
}
/**
* @covers PMScript::setFields
* @todo Implement testsetFields().
*/
public function testsetFields()
{
if (class_exists('PMScript')) {
$methods = get_class_methods( 'PMScript');
$this->assertTrue( in_array( 'setFields', $methods ), 'seems like this function is outside this class' );
}
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');
$this->markTestIncomplete('This test has not been implemented yet.');
}
/**
* @covers PMScript::setScript
* @todo Implement testsetScript().
*/
public function testsetScript()
{
if (class_exists('PMScript')) {
$methods = get_class_methods( 'PMScript');
$this->assertTrue( in_array( 'setScript', $methods ), 'seems like this function is outside this class' );
}
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() == '');
$this->markTestIncomplete('This test has not been implemented yet.');
}
/**
* @covers PMScript::validSyntax
* @todo Implement testvalidSyntax().
*/
public function testvalidSyntax()
{
if (class_exists('PMScript')) {
$methods = get_class_methods( 'PMScript');
$this->assertTrue( in_array( 'validSyntax', $methods ), 'seems like this function is outside this class' );
}
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);
$this->markTestIncomplete('This test has not been implemented yet.');
}
/**
* @covers PMScript::executeAndCatchErrors
* @todo Implement testexecuteAndCatchErrors().
*/
public function testexecuteAndCatchErrors()
{
if (class_exists('PMScript')) {
$methods = get_class_methods( 'PMScript');
$this->assertTrue( in_array( 'executeAndCatchErrors', $methods ), 'seems like this function is outside this class' );
}
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);
$this->markTestIncomplete('This test has not been implemented yet.');
}
/**
* @covers PMScript::execute
* @todo Implement testexecute().
*/
public function testexecute()
{
if (class_exists('PMScript')) {
$methods = get_class_methods( 'PMScript');
$this->assertTrue( in_array( 'execute', $methods ), 'seems like this function is outside this class' );
}
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();
$this->markTestIncomplete('This test has not been implemented yet.');
}
/**
* @covers PMScript::evaluate
* @todo Implement testevaluate().
*/
public function testevaluate()
{
if (class_exists('PMScript')) {
$methods = get_class_methods( 'PMScript');
$this->assertTrue( in_array( 'evaluate', $methods ), 'seems like this function is outside this class' );
}
}
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();
$this->markTestIncomplete('This test has not been implemented yet.');
/**
* @covers PMScript::pmToString
* @todo Implement testpmToString().
*/
public function testpmToString()
{
if (class_exists('PMScript')) {
$methods = get_class_methods( 'PMScript');
$this->assertTrue( in_array( 'pmToString', $methods ), 'seems like this function is outside this class' );
}
}
/**
* @covers PMScript::pmToInteger
* @todo Implement testpmToInteger().
*/
public function testpmToInteger()
{
if (class_exists('PMScript')) {
$methods = get_class_methods( 'PMScript');
$this->assertTrue( in_array( 'pmToInteger', $methods ), 'seems like this function is outside this class' );
}
}
/**
* @covers PMScript::pmToFloat
* @todo Implement testpmToFloat().
*/
public function testpmToFloat()
{
if (class_exists('PMScript')) {
$methods = get_class_methods( 'PMScript');
$this->assertTrue( in_array( 'pmToFloat', $methods ), 'seems like this function is outside this class' );
}
}
/**
* @covers PMScript::pmToUrl
* @todo Implement testpmToUrl().
*/
public function testpmToUrl()
{
if (class_exists('PMScript')) {
$methods = get_class_methods( 'PMScript');
$this->assertTrue( in_array( 'pmToUrl', $methods ), 'seems like this function is outside this class' );
}
}
/**
* @covers PMScript::pmSqlEscape
* @todo Implement testpmSqlEscape().
*/
public function testpmSqlEscape()
{
if (class_exists('PMScript')) {
$methods = get_class_methods( 'PMScript');
$this->assertTrue( in_array( 'pmSqlEscape', $methods ), 'seems like this function is outside this class' );
}
}
/**
* @covers PMScript::handleErrors
* @todo Implement testhandleErrors().
*/
public function testhandleErrors()
{
if (class_exists('PMScript')) {
$methods = get_class_methods( 'PMScript');
$this->assertTrue( in_array( 'handleErrors', $methods ), 'seems like this function is outside this class' );
}
}
/**
* @covers PMScript::handleFatalErrors
* @todo Implement testhandleFatalErrors().
*/
public function testhandleFatalErrors()
{
if (class_exists('PMScript')) {
$methods = get_class_methods( 'PMScript');
$this->assertTrue( in_array( 'handleFatalErrors', $methods ), 'seems like this function is outside this class' );
}
}
/**
* @covers PMScript::registerError
* @todo Implement testregisterError().
*/
public function testregisterError()
{
if (class_exists('PMScript')) {
$methods = get_class_methods( 'PMScript');
$this->assertTrue( in_array( 'registerError', $methods ), 'seems like this function is outside this class' );
}
}
}