fixing gulliver phpunits, now there are 13 failures
This commit is contained in:
@@ -37,6 +37,11 @@
|
||||
<var name="SYS_SYS" value="os" />
|
||||
<var name="SYS_LANG" value="en" />
|
||||
<var name="SYS_SKIN" value="classic" />
|
||||
<var name="DB_ADAPTER" value="mysql" />
|
||||
<var name="DB_HOST" value="localhost" />
|
||||
<var name="DB_NAME" value="wf_os" />
|
||||
<var name="DB_USER" value="root" />
|
||||
<var name="DB_PASS" value="password" />
|
||||
</php>
|
||||
|
||||
<logging>
|
||||
|
||||
@@ -67,7 +67,7 @@ class classDBTableTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[2]->getName() == 'arrKeys');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == array( 'UID' ));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -90,7 +90,7 @@ class classDBTableTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[2]->getName() == 'arrKeys');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == array( 'UID' ));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,9 @@ class classFormTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new Form();
|
||||
$file='login/login';
|
||||
$home=PATH_TRUNK . 'workflow/engine/xmlform/';
|
||||
$this->object = new Form($file, $home);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -138,7 +140,7 @@ class classFormTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[0]->getName() == 'newValues');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -219,7 +221,7 @@ class classFormTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[1]->getName() == 'noRequired');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -71,7 +71,7 @@ class classGTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[0]->getName() == 'arr');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == array());
|
||||
$this->assertTrue( $params[1]->getName() == 'value');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
@@ -666,7 +666,7 @@ class classGTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[1]->getName() == 'config');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -973,7 +973,7 @@ class classGTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[1]->getName() == 'DBEngine');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'DB_ADAPTER');
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == DB_ADAPTER);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1761,7 +1761,7 @@ class classGTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[2]->getName() == 'map');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2354,7 +2354,7 @@ class classGTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[1]->getName() == 'data');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2373,7 +2373,7 @@ class classGTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[1]->getName() == 'data');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2410,7 +2410,7 @@ class classGTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[1]->getName() == 'noWritableFiles');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,8 @@ class classPMExceptionTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new PMException();
|
||||
$message= 'PHPUnit test';
|
||||
$this->object = new PMException($message );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -43,7 +44,8 @@ class classPMExceptionTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testNumberOfMethodsInThisClass()
|
||||
{
|
||||
$methods = get_class_methods('PMException'); $this->assertTrue( count($methods) == 8);
|
||||
$methods = get_class_methods('PMException');
|
||||
$this->assertTrue( count($methods) == 9);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -221,7 +221,7 @@ class classRBACTest extends PHPUnit_Framework_TestCase
|
||||
$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[0]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[1]->getName() == 'sRolCode');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
@@ -241,7 +241,7 @@ class classRBACTest extends PHPUnit_Framework_TestCase
|
||||
$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[0]->getDefaultValue() == array());
|
||||
$this->assertTrue( $params[1]->getName() == 'sRolCode');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
|
||||
@@ -81,7 +81,7 @@ class classTreeTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[2]->getName() == 'attributes');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == Array());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -80,7 +80,7 @@ class classXmlFormTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[0]->getName() == 'newValues');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == Array());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -161,7 +161,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
|
||||
$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[0]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
|
||||
@@ -115,7 +115,7 @@ class classXmlForm_Field_DropdownTest extends PHPUnit_Framework_TestCase
|
||||
$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[0]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[1]->getName() == 'owner');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
|
||||
@@ -28,7 +28,8 @@ class classXmlForm_Field_XmlformTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
$attributes = array('type'=>'input');
|
||||
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
|
||||
$this->object = new XmlForm_Field_Xmlform($fieldNode,'lang','home','owner');
|
||||
$file = PATH_TRUNK . 'workflow/engine/xmlform/login/login';
|
||||
$this->object = new XmlForm_Field_Xmlform($fieldNode,'lang',$file,'owner');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,11 @@ class classXml_NodeTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new Xml_Node();
|
||||
$name = '';
|
||||
$type = '';
|
||||
$value = '';
|
||||
$attributes = array();
|
||||
$this->object = new Xml_Node($name, $type, $value, $attributes = array());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -68,7 +72,7 @@ class classXml_NodeTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[3]->getName() == 'attributes');
|
||||
$this->assertTrue( $params[3]->isArray() == false);
|
||||
$this->assertTrue( $params[3]->isOptional () == true);
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[3]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -59,23 +59,23 @@ class classdatabase_baseTest extends PHPUnit_Framework_TestCase
|
||||
$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[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[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[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[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');
|
||||
$this->assertTrue( $params[4]->getDefaultValue() == DB_NAME);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,8 @@ class classdynaFormHandlerTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new dynaFormHandler();
|
||||
$file=PATH_TRUNK . 'workflow/engine/xmlform/login/login.xml';
|
||||
$this->object = new dynaFormHandler($file);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -356,7 +357,7 @@ class classdynaFormHandlerTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[0]->getName() == 'aFilter');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -372,7 +373,7 @@ class classdynaFormHandlerTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[0]->getName() == 'aFilter');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,9 @@ class classfilterFormTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new filterForm();
|
||||
$template = 'login/login';
|
||||
$scriptContent = '';
|
||||
$this->object = new filterForm($template, &$scriptContent);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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.functionTest.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
||||
*/
|
||||
|
||||
class classfunctionTestTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var functionTest
|
||||
*/
|
||||
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 functionTest();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('functionTest'); $this->assertTrue( count($methods) == 2);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers functionTest::functionTest
|
||||
* @todo Implement testfunctionTest().
|
||||
*/
|
||||
public function testfunctionTest()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('functionTest', $methods ), 'exists method functionTest' );
|
||||
$r = new ReflectionMethod('functionTest', 'functionTest');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'dbc');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers functionTest::sample
|
||||
* @todo Implement testsample().
|
||||
*/
|
||||
public function testsample()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('sample', $methods ), 'exists method sample' );
|
||||
$r = new ReflectionMethod('functionTest', 'sample');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'testCase');
|
||||
$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() == 'limeTestObject');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,7 +26,8 @@ class classi18n_POTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new i18n_PO();
|
||||
$file='';
|
||||
$this->object = new i18n_PO($file);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -106,7 +106,7 @@ class classmailerTest extends PHPUnit_Framework_TestCase
|
||||
$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[5]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[6]->getName() == 'templateFile');
|
||||
$this->assertTrue( $params[6]->isArray() == false);
|
||||
$this->assertTrue( $params[6]->isOptional () == true);
|
||||
@@ -114,7 +114,7 @@ class classmailerTest extends PHPUnit_Framework_TestCase
|
||||
$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[7]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[8]->getName() == 'plainText');
|
||||
$this->assertTrue( $params[8]->isArray() == false);
|
||||
$this->assertTrue( $params[8]->isOptional () == true);
|
||||
@@ -158,7 +158,7 @@ class classmailerTest extends PHPUnit_Framework_TestCase
|
||||
$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[5]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[6]->getName() == 'content');
|
||||
$this->assertTrue( $params[6]->isArray() == false);
|
||||
$this->assertTrue( $params[6]->isOptional () == true);
|
||||
@@ -166,7 +166,7 @@ class classmailerTest extends PHPUnit_Framework_TestCase
|
||||
$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[7]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[8]->getName() == 'plainText');
|
||||
$this->assertTrue( $params[8]->isArray() == false);
|
||||
$this->assertTrue( $params[8]->isOptional () == true);
|
||||
@@ -214,7 +214,7 @@ class classmailerTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[6]->getName() == 'attachs');
|
||||
$this->assertTrue( $params[6]->isArray() == false);
|
||||
$this->assertTrue( $params[6]->isOptional () == true);
|
||||
$this->assertTrue( $params[6]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[6]->getDefaultValue() == Array());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -230,7 +230,7 @@ class classmailerTest extends PHPUnit_Framework_TestCase
|
||||
$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[0]->getDefaultValue() == Array());
|
||||
$this->assertTrue( $params[1]->getName() == 'content');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
|
||||
@@ -26,7 +26,8 @@ class classobjectTemplateTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new objectTemplate();
|
||||
$templateFile = '';
|
||||
$this->object = new objectTemplate($templateFile);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -43,7 +44,8 @@ class classobjectTemplateTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testNumberOfMethodsInThisClass()
|
||||
{
|
||||
$methods = get_class_methods('objectTemplate'); $this->assertTrue( count($methods) == 60);
|
||||
$methods = get_class_methods('objectTemplate');
|
||||
$this->assertTrue( count($methods) == 60);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -174,7 +174,7 @@ class classpagedTableTest extends PHPUnit_Framework_TestCase
|
||||
$this->assertTrue( $params[1]->getName() == 'data');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'Array');
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == Array());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,163 +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.unitTest.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
||||
*/
|
||||
|
||||
class classunitTestTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var unitTest
|
||||
*/
|
||||
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 unitTest();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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('unitTest'); $this->assertTrue( count($methods) == 6);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers unitTest::unitTest
|
||||
* @todo Implement testunitTest().
|
||||
*/
|
||||
public function testunitTest()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('unitTest', $methods ), 'exists method unitTest' );
|
||||
$r = new ReflectionMethod('unitTest', 'unitTest');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'ymlFile');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'testLime');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'testDomain');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers unitTest::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('unitTest', 'load');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'testName');
|
||||
$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 unitTest::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('unitTest', 'runSingle');
|
||||
$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');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers unitTest::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('unitTest', 'runMultiple');
|
||||
$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() == 'count');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '-1');
|
||||
$this->assertTrue( $params[2]->getName() == 'start');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '0');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers unitTest::runAll
|
||||
* @todo Implement testrunAll().
|
||||
*/
|
||||
public function testrunAll()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('runAll', $methods ), 'exists method runAll' );
|
||||
$r = new ReflectionMethod('unitTest', 'runAll');
|
||||
$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');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers unitTest::sampleTestFunction
|
||||
* @todo Implement testsampleTestFunction().
|
||||
*/
|
||||
public function testsampleTestFunction()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('sampleTestFunction', $methods ), 'exists method sampleTestFunction' );
|
||||
$r = new ReflectionMethod('unitTest', 'sampleTestFunction');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'testCase');
|
||||
$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 () == false);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -26,7 +26,10 @@ class classxmlMenuTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new xmlMenu();
|
||||
require_once(PATH_TRUNK . 'gulliver/thirdparty/pear/json/class.json.php');
|
||||
$file = 'login/login.xml';
|
||||
$home = PATH_TRUNK . 'workflow/engine/xmlform/';
|
||||
$this->object = new xmlMenu($file, $home);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,9 @@ class classxmlformTemplateTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new xmlformTemplate();
|
||||
$form = '';
|
||||
$templateFile = '';
|
||||
$this->object = new xmlformTemplate(&$form, $templateFile);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -26,7 +26,10 @@ class classymlTestCasesTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = new ymlTestCases();
|
||||
$testCaseFile = "";
|
||||
$testDomain ="";
|
||||
$testLime = "";
|
||||
$this->object = new ymlTestCases( $testCaseFile, &$testDomain, &$testLime);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,7 +87,7 @@ class classymlTestCasesTest extends PHPUnit_Framework_TestCase
|
||||
$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[1]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -123,7 +126,7 @@ class classymlTestCasesTest extends PHPUnit_Framework_TestCase
|
||||
$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[1]->getDefaultValue() == array());
|
||||
$this->assertTrue( $params[2]->getName() == 'count');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
@@ -150,7 +153,7 @@ class classymlTestCasesTest extends PHPUnit_Framework_TestCase
|
||||
$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[1]->getDefaultValue() == array());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -169,7 +172,7 @@ class classymlTestCasesTest extends PHPUnit_Framework_TestCase
|
||||
$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[1]->getDefaultValue() == array());
|
||||
$this->assertTrue( $params[2]->getName() == 'count');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
|
||||
@@ -15,7 +15,16 @@ define('PATH_HOME', PATH_TRUNK . 'workflow' . PATH_SEP);
|
||||
define('SYS_SYS', $GLOBALS['SYS_SYS']);
|
||||
define('SYS_LANG', $GLOBALS['SYS_LANG']);
|
||||
define('SYS_SKIN', $GLOBALS['SYS_SKIN']);
|
||||
define('DB_ADAPTER', $GLOBALS['DB_ADAPTER']);
|
||||
define('DB_NAME', $GLOBALS['DB_NAME']);
|
||||
define('DB_USER', $GLOBALS['DB_USER']);
|
||||
define('DB_PASS', $GLOBALS['DB_PASS']);
|
||||
define('DB_HOST', $GLOBALS['DB_HOST']);
|
||||
define('PATH_C', PATH_TRUNK . 'tmp' );
|
||||
define('PATH_SMARTY_C', PATH_TRUNK . 'tmp' );
|
||||
define('PATH_SMARTY_CACHE', PATH_TRUNK . 'tmp' );
|
||||
|
||||
mkdir (PATH_C);
|
||||
require PATH_HOME . 'engine' . PATH_SEP . 'config' . PATH_SEP . 'paths.php';
|
||||
|
||||
set_include_path(
|
||||
@@ -29,7 +38,7 @@ set_include_path(
|
||||
// perpare propel env.
|
||||
require_once "propel/Propel.php";
|
||||
require_once "creole/Creole.php";
|
||||
|
||||
require_once "pear/Net/JSON.php";
|
||||
Propel::init( PATH_CORE . "config/databases.php" );
|
||||
|
||||
//initialize required classes
|
||||
|
||||
Reference in New Issue
Block a user