Files
luos/old_tests/automated/workflow/engine/classes/classPMScriptTest.php
davidcallizaya bfc0be7e44 HOR-3207
Change web entry model.
2017-06-03 12:45:03 -04:00

152 lines
5.2 KiB
PHP

<?php
require_once PATH_TRUNK . 'gulliver/thirdparty/smarty/libs/Smarty.class.php';
require_once PATH_TRUNK . 'gulliver/system/class.xmlform.php';
require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php';
require_once PATH_TRUNK . 'gulliver/system/class.form.php';
require_once PATH_TRUNK . 'gulliver/system/class.dbconnection.php';
require_once PATH_TRUNK . 'gulliver/thirdparty/propel/Propel.php';
require_once PATH_TRUNK . 'gulliver/thirdparty/creole/Creole.php';
require_once PATH_TRUNK . 'gulliver/thirdparty/pear/PEAR.php';
require_once PATH_TRUNK . '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();
}
}