Files
luos/tests/automated/workflow/engine/classes/classJavaBridgePMTest.php

101 lines
3.7 KiB
PHP
Raw Normal View History

2012-07-12 20:40:06 -04:00
<?php
require_once PATH_TRUNK . 'gulliver/thirdparty/smarty/libs/Smarty.class.php';
require_once PATH_TRUNK . 'gulliver/system/class.xmlform.php';
require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php';
require_once PATH_TRUNK . 'gulliver/system/class.form.php';
require_once PATH_TRUNK . 'gulliver/system/class.dbconnection.php';
require_once PATH_TRUNK . 'gulliver/thirdparty/propel/Propel.php';
require_once PATH_TRUNK . 'gulliver/thirdparty/creole/Creole.php';
require_once PATH_TRUNK . 'gulliver/thirdparty/pear/PEAR.php';
require_once PATH_TRUNK . 'workflow/engine/classes/class.javaBridgePM.php';
/**
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
2012-07-12 20:40:06 -04:00
*/
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);
2012-07-12 20:40:06 -04:00
}
/**
* @covers JavaBridgePM::checkJavaExtension
* @todo Implement testcheckJavaExtension().
*/
2012-07-12 20:40:06 -04:00
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().
*/
2012-07-12 20:40:06 -04:00
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().
*/
2012-07-12 20:40:06 -04:00
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);
}
}