fixing testunits for gulliver classes

This commit is contained in:
Fernando
2012-07-13 06:27:36 -04:00
parent 259263bcc8
commit 8700af7df4
48 changed files with 516 additions and 419 deletions

View File

@@ -15,9 +15,11 @@
<testsuite name="automated">
<directory>./tests/automated/</directory>
</testsuite>
<!--
<testsuite name="unit">
<directory>./tests/unit/</directory>
</testsuite>
-->
</testsuites>
<!-- <filter>

View File

@@ -26,7 +26,9 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -71,7 +73,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[3]->isArray() == false);
$this->assertTrue( $params[3]->isOptional () == true);
$this->assertTrue( $params[3]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field::validateValue
@@ -86,7 +88,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'value');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field::executeSQL
@@ -105,7 +107,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '-1');
}
}
/**
* @covers XmlForm_Field::htmlentities
@@ -128,7 +130,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == true);
$this->assertTrue( $params[2]->getDefaultValue() == 'utf-8');
}
}
/**
* @covers XmlForm_Field::render
@@ -144,7 +146,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field::renderGrid
@@ -172,7 +174,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[3]->isArray() == false);
$this->assertTrue( $params[3]->isOptional () == true);
$this->assertTrue( $params[3]->getDefaultValue() == '-1');
}
}
/**
* @covers XmlForm_Field::renderTable
@@ -196,7 +198,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == true);
$this->assertTrue( $params[2]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field::dependentOf
@@ -208,7 +210,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('dependentOf', $methods ), 'exists method dependentOf' );
$r = new ReflectionMethod('XmlForm_Field', 'dependentOf');
$params = $r->getParameters();
}
}
/**
* @covers XmlForm_Field::mask
@@ -226,7 +228,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'value');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field::getAttributes
@@ -238,7 +240,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('getAttributes', $methods ), 'exists method getAttributes' );
$r = new ReflectionMethod('XmlForm_Field', 'getAttributes');
$params = $r->getParameters();
}
}
/**
* @covers XmlForm_Field::getEvents
@@ -250,7 +252,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('getEvents', $methods ), 'exists method getEvents' );
$r = new ReflectionMethod('XmlForm_Field', 'getEvents');
$params = $r->getParameters();
}
}
/**
* @covers XmlForm_Field::attachEvents
@@ -265,7 +267,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'elementRef');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field::createXmlNode
@@ -281,7 +283,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field::updateXmlNode
@@ -300,7 +302,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field::getXmlAttributes
@@ -316,7 +318,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field::maskValue
@@ -334,7 +336,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field::cloneObject
@@ -346,7 +348,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('cloneObject', $methods ), 'exists method cloneObject' );
$r = new ReflectionMethod('XmlForm_Field', 'cloneObject');
$params = $r->getParameters();
}
}
/**
* @covers XmlForm_Field::getPMTableValue
@@ -361,7 +363,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'oOwner');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field::NSRequiredValue
@@ -377,7 +379,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field::NSGridLabel
@@ -393,7 +395,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field::NSDefaultValue
@@ -409,7 +411,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field::NSGridType
@@ -425,7 +427,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field::NSDependentFields
@@ -441,7 +443,7 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field::renderHint
@@ -453,6 +455,6 @@ class classXmlForm_FieldTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('renderHint', $methods ), 'exists method renderHint' );
$r = new ReflectionMethod('XmlForm_Field', 'renderHint');
$params = $r->getParameters();
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_ButtonTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Button();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Button($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_ButtonTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -64,6 +66,6 @@ class classXmlForm_Field_ButtonTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_CaptionCurrencyTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_CaptionCurrency();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_CaptionCurrency($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_CaptionCurrencyTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -60,6 +62,6 @@ class classXmlForm_Field_CaptionCurrencyTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_CaptionPercentageTest extends PHPUnit_Framework_TestCas
*/
protected function setUp()
{
$this->object = new XmlForm_Field_CaptionPercentage();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_CaptionPercentage($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_CaptionPercentageTest extends PHPUnit_Framework_TestCas
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -60,6 +62,6 @@ class classXmlForm_Field_CaptionPercentageTest extends PHPUnit_Framework_TestCas
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_CaptionTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Caption();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Caption($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_CaptionTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -62,7 +64,7 @@ class classXmlForm_Field_CaptionTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Caption::render
@@ -98,6 +100,6 @@ class classXmlForm_Field_CaptionTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[5]->isArray() == false);
$this->assertTrue( $params[5]->isOptional () == true);
$this->assertTrue( $params[5]->getDefaultValue() == '-1');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_CheckGroupTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_CheckGroup();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_CheckGroup($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_CheckGroupTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -64,6 +66,6 @@ class classXmlForm_Field_CheckGroupTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_CheckGroupViewTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_CheckGroupView();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_CheckGroupView($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_CheckGroupViewTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -60,6 +62,6 @@ class classXmlForm_Field_CheckGroupViewTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_Checkbox2Test extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Checkbox2();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Checkbox2($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_Checkbox2Test extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -60,6 +62,6 @@ class classXmlForm_Field_Checkbox2Test extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_CheckboxTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Checkbox();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Checkbox($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_CheckboxTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -64,7 +66,7 @@ class classXmlForm_Field_CheckboxTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Checkbox::renderGrid
@@ -82,7 +84,7 @@ class classXmlForm_Field_CheckboxTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Checkbox::maskValue
@@ -100,6 +102,6 @@ class classXmlForm_Field_CheckboxTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_CheckboxptTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Checkboxpt();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Checkboxpt($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_CheckboxptTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -64,7 +66,7 @@ class classXmlForm_Field_CheckboxptTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Checkboxpt::renderGrid
@@ -82,7 +84,7 @@ class classXmlForm_Field_CheckboxptTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Checkboxpt::maskValue
@@ -100,6 +102,6 @@ class classXmlForm_Field_CheckboxptTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_CurrencyTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Currency();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Currency($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_CurrencyTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -64,7 +66,7 @@ class classXmlForm_Field_CurrencyTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Currency::renderGrid
@@ -82,6 +84,6 @@ class classXmlForm_Field_CurrencyTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_DVEditorTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_DVEditor();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_DVEditor($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_DVEditorTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -63,7 +65,7 @@ class classXmlForm_Field_DVEditorTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_DVEditor::attachEvents
@@ -78,6 +80,6 @@ class classXmlForm_Field_DVEditorTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'element');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_Date2Test extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Date2();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Date2($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_Date2Test extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -59,7 +61,7 @@ class classXmlForm_Field_Date2Test extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'date');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Date2::isvalidBeforeFormat
@@ -74,7 +76,7 @@ class classXmlForm_Field_Date2Test extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'date');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Date2::calculateBeforeFormat
@@ -92,7 +94,7 @@ class classXmlForm_Field_Date2Test extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'sign');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Date2::render
@@ -112,7 +114,7 @@ class classXmlForm_Field_Date2Test extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Date2::renderGrid
@@ -136,6 +138,6 @@ class classXmlForm_Field_Date2Test extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == true);
$this->assertTrue( $params[2]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_Date5Test extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Date5();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Date5($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_Date5Test extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -63,7 +65,7 @@ class classXmlForm_Field_Date5Test extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Date5::isvalidBeforeFormat
@@ -78,7 +80,7 @@ class classXmlForm_Field_Date5Test extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'date');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Date5::calculateBeforeFormat
@@ -96,7 +98,7 @@ class classXmlForm_Field_Date5Test extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'sign');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Date5::render
@@ -116,7 +118,7 @@ class classXmlForm_Field_Date5Test extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Date5::renderGrid
@@ -140,7 +142,7 @@ class classXmlForm_Field_Date5Test extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == true);
$this->assertTrue( $params[2]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Date5::__draw_widget
@@ -162,7 +164,7 @@ class classXmlForm_Field_Date5Test extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == true);
$this->assertTrue( $params[2]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Date5::getSplitDate
@@ -180,6 +182,6 @@ class classXmlForm_Field_Date5Test extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'mask');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_DateTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Date();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Date($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_DateTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -59,7 +61,7 @@ class classXmlForm_Field_DateTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'date');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Date::isvalidBeforeFormat
@@ -74,7 +76,7 @@ class classXmlForm_Field_DateTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'date');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Date::calculateBeforeFormat
@@ -92,7 +94,7 @@ class classXmlForm_Field_DateTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'sign');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Date::render
@@ -112,7 +114,7 @@ class classXmlForm_Field_DateTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Date::renderGrid
@@ -136,7 +138,7 @@ class classXmlForm_Field_DateTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == true);
$this->assertTrue( $params[2]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Date::__draw_widget
@@ -158,6 +160,6 @@ class classXmlForm_Field_DateTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == true);
$this->assertTrue( $params[2]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_DateViewTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_DateView();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_DateView($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_DateViewTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -60,6 +62,6 @@ class classXmlForm_Field_DateViewTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_DropdownTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Dropdown();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Dropdown($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_DropdownTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -62,7 +64,7 @@ class classXmlForm_Field_DropdownTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Dropdown::render
@@ -98,7 +100,7 @@ class classXmlForm_Field_DropdownTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[5]->isArray() == false);
$this->assertTrue( $params[5]->isOptional () == true);
$this->assertTrue( $params[5]->getDefaultValue() == '-1');
}
}
/**
* @covers XmlForm_Field_Dropdown::renderGrid
@@ -126,6 +128,6 @@ class classXmlForm_Field_DropdownTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[3]->isArray() == false);
$this->assertTrue( $params[3]->isOptional () == true);
$this->assertTrue( $params[3]->getDefaultValue() == '-1');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_DropdownptTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Dropdownpt();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Dropdownpt($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_DropdownptTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -64,7 +66,7 @@ class classXmlForm_Field_DropdownptTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Dropdownpt::maskValue
@@ -82,6 +84,6 @@ class classXmlForm_Field_DropdownptTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_FastSearchTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_FastSearch();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_FastSearch($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_FastSearchTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -46,4 +48,4 @@ class classXmlForm_Field_FastSearchTest extends PHPUnit_Framework_TestCase
$methods = get_class_methods('XmlForm_Field_FastSearch'); $this->assertTrue( count($methods) == 24);
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_FileTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_File();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_File($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_FileTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -60,6 +62,6 @@ class classXmlForm_Field_FileTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_GridTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Grid();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Grid($fieldNode,'param', 'param');
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_GridTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -65,7 +67,7 @@ class classXmlForm_Field_GridTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->getName() == 'home');
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Grid::parseFile
@@ -83,7 +85,7 @@ class classXmlForm_Field_GridTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'language');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Grid::render
@@ -102,7 +104,7 @@ class classXmlForm_Field_GridTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Grid::renderGrid
@@ -125,7 +127,7 @@ class classXmlForm_Field_GridTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == true);
$this->assertTrue( $params[2]->getDefaultValue() == '-1');
}
}
/**
* @covers XmlForm_Field_Grid::flipValues
@@ -140,6 +142,6 @@ class classXmlForm_Field_GridTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'values');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_HTMLTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_HTML();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_HTML($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_HTMLTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -63,7 +65,7 @@ class classXmlForm_Field_HTMLTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_HTML::attachEvents
@@ -78,6 +80,6 @@ class classXmlForm_Field_HTMLTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'element');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_HiddenTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Hidden();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Hidden($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_HiddenTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -62,7 +64,7 @@ class classXmlForm_Field_HiddenTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Hidden::renderGrid
@@ -80,7 +82,7 @@ class classXmlForm_Field_HiddenTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Hidden::renderTable
@@ -98,6 +100,6 @@ class classXmlForm_Field_HiddenTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_ImageTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Image();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Image($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_ImageTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -63,6 +65,6 @@ class classXmlForm_Field_ImageTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_JavaScriptTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_JavaScript();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_JavaScript($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_JavaScriptTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -67,7 +69,7 @@ class classXmlForm_Field_JavaScriptTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == true);
$this->assertTrue( $params[2]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_JavaScript::render
@@ -87,7 +89,7 @@ class classXmlForm_Field_JavaScriptTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_JavaScript::renderGrid
@@ -105,7 +107,7 @@ class classXmlForm_Field_JavaScriptTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_JavaScript::validateValue
@@ -120,6 +122,6 @@ class classXmlForm_Field_JavaScriptTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'value');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_LabelTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Label();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Label($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_LabelTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -46,4 +48,4 @@ class classXmlForm_Field_LabelTest extends PHPUnit_Framework_TestCase
$methods = get_class_methods('XmlForm_Field_Label'); $this->assertTrue( count($methods) == 24);
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_LinkTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Link();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Link($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_LinkTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -64,7 +66,7 @@ class classXmlForm_Field_LinkTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Link::renderGrid
@@ -79,12 +81,12 @@ class classXmlForm_Field_LinkTest 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);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Link::renderTable
@@ -104,6 +106,6 @@ class classXmlForm_Field_LinkTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_ListboxTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Listbox();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Listbox($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_ListboxTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -62,7 +64,7 @@ class classXmlForm_Field_ListboxTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Listbox::render
@@ -82,7 +84,7 @@ class classXmlForm_Field_ListboxTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Listbox::renderGrid
@@ -102,6 +104,6 @@ class classXmlForm_Field_ListboxTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_PasswordTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Password();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Password($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_PasswordTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -60,6 +62,6 @@ class classXmlForm_Field_PasswordTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_PercentageTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Percentage();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Percentage($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_PercentageTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -64,6 +66,6 @@ class classXmlForm_Field_PercentageTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_PrintTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Print();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Print($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_PrintTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -64,6 +66,6 @@ class classXmlForm_Field_PrintTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_RadioGroupTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_RadioGroup();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_RadioGroup($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_RadioGroupTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -62,7 +64,7 @@ class classXmlForm_Field_RadioGroupTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_RadioGroup::render
@@ -80,6 +82,6 @@ class classXmlForm_Field_RadioGroupTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_RadioGroupViewTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_RadioGroupView();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_RadioGroupView($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_RadioGroupViewTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -64,6 +66,6 @@ class classXmlForm_Field_RadioGroupViewTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_ResetTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Reset();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Reset($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_ResetTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -62,6 +64,6 @@ class classXmlForm_Field_ResetTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_SimpleTextTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_SimpleText();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_SimpleText($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_SimpleTextTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -62,7 +64,7 @@ class classXmlForm_Field_SimpleTextTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_SimpleText::renderGrid
@@ -80,6 +82,6 @@ class classXmlForm_Field_SimpleTextTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_SubmitTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Submit();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Submit($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_SubmitTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -62,6 +64,6 @@ class classXmlForm_Field_SubmitTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_SubtitleTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Subtitle();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Subtitle($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_SubtitleTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -60,7 +62,7 @@ class classXmlForm_Field_SubtitleTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Subtitle::validateValue
@@ -75,6 +77,6 @@ class classXmlForm_Field_SubtitleTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'value');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_SuggestTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Suggest();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Suggest($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_SuggestTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -64,7 +66,7 @@ class classXmlForm_Field_SuggestTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Suggest::renderGrid
@@ -82,7 +84,7 @@ class classXmlForm_Field_SuggestTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Suggest::renderTable
@@ -100,6 +102,6 @@ class classXmlForm_Field_SuggestTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_TextTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Text();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Text($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_TextTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -64,7 +66,7 @@ class classXmlForm_Field_TextTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_Text::renderGrid
@@ -82,7 +84,7 @@ class classXmlForm_Field_TextTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Text::renderTable
@@ -100,6 +102,6 @@ class classXmlForm_Field_TextTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_TextareaTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Textarea();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Textarea($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_TextareaTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -62,7 +64,7 @@ class classXmlForm_Field_TextareaTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Textarea::renderGrid
@@ -80,6 +82,6 @@ class classXmlForm_Field_TextareaTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_TitleTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Title();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Title($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_TitleTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -62,7 +64,7 @@ class classXmlForm_Field_TitleTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Title::validateValue
@@ -77,6 +79,6 @@ class classXmlForm_Field_TitleTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'value');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_XmlMenuTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_XmlMenu();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_XmlMenu($fieldNode,'lang','home','owner');
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_XmlMenuTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -68,7 +70,7 @@ class classXmlForm_Field_XmlMenuTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[3]->getName() == 'owner');
$this->assertTrue( $params[3]->isArray() == false);
$this->assertTrue( $params[3]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_XmlMenu::render
@@ -83,7 +85,7 @@ class classXmlForm_Field_XmlMenuTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'value');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_XmlMenu::renderGrid
@@ -98,6 +100,6 @@ class classXmlForm_Field_XmlMenuTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'value');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_XmlformTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_Xmlform();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_Xmlform($fieldNode,'lang','home','owner');
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_XmlformTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -65,7 +67,7 @@ class classXmlForm_Field_XmlformTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->getName() == 'home');
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Xmlform::parseFile
@@ -83,7 +85,7 @@ class classXmlForm_Field_XmlformTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'language');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_Xmlform::render
@@ -98,6 +100,6 @@ class classXmlForm_Field_XmlformTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'values');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_YesNoTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_YesNo();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_YesNo($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_YesNoTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -64,7 +66,7 @@ class classXmlForm_Field_YesNoTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
}
}
/**
* @covers XmlForm_Field_YesNo::renderGrid
@@ -82,6 +84,6 @@ class classXmlForm_Field_YesNoTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classXmlForm_Field_cellMarkTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XmlForm_Field_cellMark();
$attributes = array('type'=>'input');
$fieldNode = new Xml_Node('testField', 'type', 'value', $attributes);
$this->object = new XmlForm_Field_cellMark($fieldNode);
}
/**
@@ -38,7 +40,7 @@ class classXmlForm_Field_cellMarkTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -62,7 +64,7 @@ class classXmlForm_Field_cellMarkTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XmlForm_Field_cellMark::tdClass
@@ -80,6 +82,6 @@ class classXmlForm_Field_cellMarkTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'owner');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -38,7 +38,7 @@ class classtestToolsTest extends PHPUnit_Framework_TestCase
}
/**
* This is the default method to test, if the class still having
* This is the default method to test, if the class still having
* the same number of methods.
*/
public function testNumberOfMethodsInThisClass()
@@ -71,7 +71,7 @@ class classtestToolsTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[4]->getName() == 'importFile');
$this->assertTrue( $params[4]->isArray() == false);
$this->assertTrue( $params[4]->isOptional () == false);
}
}
/**
* @covers testTools::importLocalDB
@@ -86,7 +86,7 @@ class classtestToolsTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'importFile');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers testTools::callMethod
@@ -110,7 +110,7 @@ class classtestToolsTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[3]->getName() == 'SESSION');
$this->assertTrue( $params[3]->isArray() == false);
$this->assertTrue( $params[3]->isOptional () == false);
}
}
/**
* @covers testTools::arrayAppend
@@ -128,7 +128,7 @@ class classtestToolsTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'appendFrom');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers testTools::arrayDelete
@@ -143,7 +143,7 @@ class classtestToolsTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'array');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers testTools::replaceVariables
@@ -161,8 +161,8 @@ class classtestToolsTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'ExternalVariables');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == 'Array');
}
$this->assertTrue( $params[1]->getDefaultValue() == Array());
}
/**
* @covers testTools::findValue
@@ -180,6 +180,6 @@ class classtestToolsTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'obj');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -22,7 +22,7 @@
*
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
*
*
*/
require_once ("classes/model/Application.php");
@@ -66,24 +66,27 @@ G::LoadClass('pmScript');
* @package workflow.engine.classes
*/
class Cases {
private $appSolr = null;
function __construct(){
//get Solr initialization variables
if(($solrConf = System::solrEnv()) !== false){
G::LoadClass('AppSolr');
$this->appSolr = new AppSolr($solrConf['solr_enabled'], $solrConf['solr_host'], $solrConf['solr_instance']);
}
}
/*
* Ask if an user can start a case
* @param string $sUIDUser
* @return boolean
*/
class Cases
{
private $appSolr = null;
function canStartCase($sUIDUser = '') {
public function __construct()
{
//get Solr initialization variables
if (($solrConf = System::solrEnv()) !== false) {
G::LoadClass('AppSolr');
$this->appSolr = new AppSolr($solrConf['solr_enabled'], $solrConf['solr_host'], $solrConf['solr_instance']);
}
}
/*
* Ask if an user can start a case
* @param string $sUIDUser
* @return boolean
*/
public function canStartCase($sUIDUser = '')
{
$c = new Criteria();
$c->clearSelectColumns();
$c->addSelectColumn('COUNT(*)');
@@ -97,8 +100,9 @@ class Cases {
$rs->next();
$row = $rs->getRow();
$count = $row[0];
if ($count > 0)
if ($count > 0) {
return true;
}
//check groups
G::LoadClass('groups');
@@ -315,7 +319,7 @@ class Cases {
$rs->next();
while ($row = $rs->getRow()) {
if ($typeView == 'category') {
$taskTitle = TaskPeer::retrieveByPK($row['TAS_UID']);
$taskTitle = TaskPeer::retrieveByPK($row['TAS_UID']);
$row['TAS_TITLE']= $taskTitle->getTasTitle();
$row['CATEGORY_NAME'] = ($row['CATEGORY_NAME'] == '') ? G::LoadTranslation('ID_PROCESS_NOCATEGORY') : $row['CATEGORY_NAME'];
$rows[] = array('uid' => $row['TAS_UID'], 'value' => $row['PRO_TITLE'] . ' (' . $row['TAS_TITLE'] . ')', 'pro_uid' => $row['PRO_UID'], 'cat' => $row['PRO_CATEGORY'], 'catname' => $row['CATEGORY_NAME']);
@@ -418,7 +422,7 @@ class Cases {
function isSelfService($USR_UID, $TAS_UID){
$tasks = $this->getSelfServiceTasks($USR_UID);
foreach( $tasks as $key => $val ) {
if( $TAS_UID == $val['uid'] ){
return true;
@@ -604,7 +608,7 @@ class Cases {
$oApplication = new Application;
try {
$fields = $oApplication->load($sAppUid);
}
}
catch (Exception $e) {
return $res;
}
@@ -677,7 +681,7 @@ class Cases {
$lang = defined('SYS_LANG') ? SYS_LANG : 'en';
$bUpdatedDefTitle = false;
$bUpdatedDefDescription = false;
$cri = new Criteria;
$cri->clearSelectColumns();
$cri->addSelectColumn(AppDelegationPeer::TAS_UID );
@@ -687,7 +691,7 @@ class Cases {
$rsCri->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rsCri->next();
$rowCri = $rsCri->getRow();
while (is_array($rowCri)) {
//load only the tas_def fields, because these three or two values are needed
//SELECT CONTENT.CON_CATEGORY, CONTENT.CON_VALUE FROM CONTENT WHERE CONTENT.CON_ID='63515150649b03231c3b020026243292' AND CONTENT.CON_LANG='es'
@@ -710,7 +714,7 @@ class Cases {
$newAppTitle = G::replaceDataField($tasDefTitle, $aAppData);
$res['APP_TITLE'] = $newAppTitle;
if ( isset($fields['APP_TITLE']) && $fields['APP_TITLE'] == $newAppTitle ) break;
$bUpdatedDefTitle = true;
/// updating the value in content for row (APP_TITLE,$lan)
$con = Propel::getConnection('workflow');
@@ -718,21 +722,21 @@ class Cases {
$c1->add(ContentPeer::CON_CATEGORY, 'APP_TITLE');
$c1->add(ContentPeer::CON_ID, $sAppUid);
$c1->add(ContentPeer::CON_LANG, $lang);
// update set
$c2 = new Criteria('workflow');
$c2->add(ContentPeer::CON_VALUE, $newAppTitle );
BasePeer::doUpdate($c1, $c2,$con);
}
}
break;
case 'TAS_DEF_DESCRIPTION' :
case 'TAS_DEF_DESCRIPTION' :
if ($bUpdatedDefDescription) break;
$tasDefDescription = trim($row['CON_VALUE']);
if ($tasDefDescription != '' ) {
$newAppDescription = G::replaceDataField($tasDefDescription, $aAppData);
$newAppDescription = G::replaceDataField($tasDefDescription, $aAppData);
$res['APP_DESCRIPTION'] = $newAppDescription;
if ( isset($fields['APP_DESCRIPTION']) && $fields['APP_DESCRIPTION'] == $newAppDescription ) break;
$bUpdatedDefDescription = true;
/// updating the value in content for row (APP_TITLE,$lan)
$con = Propel::getConnection('workflow');
@@ -740,12 +744,12 @@ class Cases {
$c1->add(ContentPeer::CON_CATEGORY, 'APP_DESCRIPTION');
$c1->add(ContentPeer::CON_ID, $sAppUid);
$c1->add(ContentPeer::CON_LANG, $lang);
// update set
$c2 = new Criteria('workflow');
$c2->add(ContentPeer::CON_VALUE, $newAppDescription );
BasePeer::doUpdate($c1, $c2,$con);
}
}
break;
}
$rs->next();
@@ -856,9 +860,9 @@ class Cases {
$appFields = $oApp->toArray(BasePeer::TYPE_FIELDNAME);
if (isset($Fields['APP_TITLE'])) $appFields['APP_TITLE'] = $Fields['APP_TITLE'];
if (isset($Fields['APP_DESCRIPTION'])) $appFields['APP_DESCRIPTION'] = $Fields['APP_DESCRIPTION'];
$newValues = $this->newRefreshCaseTitleAndDescription($sAppUid, $appFields, $aApplicationFields);
//Start: Save History --By JHL
if (isset($Fields['CURRENT_DYNAFORM'])) {//only when that variable is set.. from Save
$FieldsBefore = $this->loadCase( $sAppUid );
@@ -886,18 +890,18 @@ class Cases {
$DEL_INDEX = isset($Fields['DEL_INDEX']) ? $Fields['DEL_INDEX'] : '';
$TAS_UID = isset($Fields['TAS_UID']) ? $Fields['TAS_UID'] : '';
G::LoadClass('reportTables');
require_once 'classes/model/AdditionalTables.php';
$oReportTables = new ReportTables();
$addtionalTables = new additionalTables();
$oReportTables->updateTables($appFields['PRO_UID'], $sAppUid, $Fields['APP_NUMBER'], $aApplicationFields);
$addtionalTables->updateReportTables($appFields['PRO_UID'], $sAppUid, $Fields['APP_NUMBER'], $aApplicationFields);
//now update the priority in appdelegation table, using the defined variable in task
if (trim($DEL_INDEX) != '' && trim($TAS_UID) != '') {
//optimized code to avoid load task content row.
//optimized code to avoid load task content row.
$c = new Criteria();
$c->clearSelectColumns();
$c->addSelectColumn(TaskPeer::TAS_PRIORITY_VARIABLE);
@@ -907,7 +911,7 @@ class Cases {
$rs->next();
$row = $rs->getRow();
$VAR_PRI = substr($row['TAS_PRIORITY_VARIABLE'], 2);
//$oTask = new Task;
//$array = $oTask->load($TAS_UID);
//$VAR_PRI = substr($array['TAS_PRIORITY_VARIABLE'], 2);
@@ -931,9 +935,9 @@ class Cases {
{
$this->appSolr->updateApplicationSearchIndex($sAppUid);
}
return $Fields;
}
}
catch (exception $e) {
throw ($e);
}
@@ -1003,11 +1007,11 @@ class Cases {
SubApplicationPeer::doDelete($oCriteria2);
$oApp = new Application;
$result = $oApp->remove($sAppUid);
//delete application from index
if($this->appSolr != null)
$this->appSolr->deleteApplicationSearchIndex($sAppUid);
return $result;
} catch (exception $e) {
throw ($e);
@@ -1031,7 +1035,7 @@ class Cases {
//update searchindex
if($this->appSolr != null)
$this->appSolr->updateApplicationSearchIndex($sAppUid);
} catch (exception $e) {
throw ($e);
}
@@ -1053,7 +1057,7 @@ class Cases {
$oAppDel->setDelInitDate("now");
$oAppDel->setUsrUid($usrId);
$oAppDel->save();
//update searchindex
if($this->appSolr != null)
$this->appSolr->updateApplicationSearchIndex($sAppUid);
@@ -1156,14 +1160,14 @@ class Cases {
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$aPrevious = $this->searchOpenPreviousTasks($aRow['TAS_UID'], $sAppUid);
if (is_array($aPrevious) && count($aPrevious) > 0 ) {
$aThreads[] = array_merge($aPrevious, $aThreads);
}
$oDataset->next();
}
return $aThreads;
} catch (exception $e) {
throw ($e);
@@ -1187,7 +1191,7 @@ class Cases {
//check if this task ( $taskUid ) has open delegations
$delegations = $this->getReviewedTasks($taskUid, $sAppUid);
if ($delegations !== false) {
if ( count($delegations['open']) > 0) {
//there is an open delegation, so we need to return the delegation row
@@ -1207,7 +1211,7 @@ class Cases {
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRow = $oDataset->getRow();
while (is_array($aRow)) {
$delegations = $this->getReviewedTasks($aRow['TAS_UID'], $sAppUid);
@@ -1231,7 +1235,7 @@ class Cases {
$aPreviousTasks[] = $aRow['TAS_UID'];
// passing the array of previous tasks in oprder to avoid an infinite loop that prevents
$openPreviousTask = $this->searchOpenPreviousTasks($aRow['TAS_UID'], $sAppUid, $aPreviousTasks);
if (count($aPreviousTasks) > 0) {
$aTaskReviewed = array_merge($aTaskReviewed, $openPreviousTask);
}
@@ -1470,7 +1474,7 @@ class Cases {
$this->appSolr->updateApplicationSearchIndex($sAppUid);
return $result;
}
}
catch (exception $e) {
throw ($e);
}
@@ -1497,10 +1501,10 @@ class Cases {
$aData['DEL_THREAD'] = $iAppThreadIndex;
$appDelegation->update($aData);
//update searchindex
//update searchindex
if($this->appSolr != null)
$this->appSolr->updateApplicationSearchIndex($sAppUid);
return true;
} catch (exception $e) {
throw ($e);
@@ -1582,25 +1586,25 @@ class Cases {
$c1 = new Criteria('workflow');
$c1->add(AppThreadPeer::APP_UID, $sAppUid);
$c1->add(AppThreadPeer::APP_THREAD_INDEX, $iAppThreadIndex);
// update set
$c2 = new Criteria('workflow');
$c2->add(AppThreadPeer::DEL_INDEX, $iNewDelIndex );
BasePeer::doUpdate($c1, $c2,$con);
/*
/*
$appThread = new AppThread();
$aData = array();
$aData['APP_UID'] = $sAppUid;
$aData['APP_THREAD_INDEX'] = $iAppThreadIndex;
$aData['DEL_INDEX'] = $iNewDelIndex;
$aData['DEL_INDEX'] = $iNewDelIndex;
$appThread->update($aData);
*/
//update searchindex
if($this->appSolr != null)
$this->appSolr->updateApplicationSearchIndex($sAppUid);
return $iNewDelIndex;
}
}
catch (exception $e) {
throw ($e);
}
@@ -1753,7 +1757,7 @@ class Cases {
throw (new PropelException('The row cannot be created!', new PropelException($msg)));
}
}
} catch (exception $e) {
throw ($e);
}
@@ -1805,7 +1809,7 @@ class Cases {
function startCase($sTasUid, $sUsrUid, $isSubprocess=false) {
if ($sTasUid != '') {
try {
$this->Task = new Task;
$Fields = $this->Task->Load($sTasUid);
@@ -2180,7 +2184,7 @@ class Cases {
$c->addAsColumn('DEL_FINISH_DATE', $oDataBase->getCaseWhen("DEL_FINISH_DATE IS NULL", "'-'", AppDelegationPeer::DEL_FINISH_DATE ) );
$c->addAsColumn('APP_TYPE', $oDataBase->getCaseWhen("DEL_FINISH_DATE IS NULL", "'IN_PROGRESS'", AppDelayPeer::APP_TYPE ) );
}
$c->addSelectColumn(AppDelegationPeer::DEL_INIT_DATE);
//$c->addSelectColumn(AppDelegationPeer::DEL_FINISH_DATE);
///-- $c->addAsColumn('DEL_FINISH_DATE', "IF (DEL_FINISH_DATE IS NULL, '-', " . AppDelegationPeer::DEL_FINISH_DATE . ") ");
@@ -2332,7 +2336,7 @@ class Cases {
$c->addAsColumn('DEL_TASK_DUE_DATE', " IF (" . AppDelegationPeer::DEL_TASK_DUE_DATE . " <= NOW(), CONCAT('<span style=\'color:red\';>', " . AppDelegationPeer::DEL_TASK_DUE_DATE . ", '</span>'), " . AppDelegationPeer::DEL_TASK_DUE_DATE . ") ");
global $RBAC;
//seems the PM_SUPERVISOR can delete a completed case
//seems the PM_SUPERVISOR can delete a completed case
if ($sTypeList == "completed" && $RBAC->userCanAccess('PM_SUPERVISOR') == 1) {
$c->addAsColumn("DEL_LINK", "CONCAT('" . G::LoadTranslation('ID_DELETE') . "')");
}
@@ -2537,7 +2541,7 @@ class Cases {
$c->add($c->getNewCriterion(AppThreadPeer::APP_THREAD_STATUS, 'OPEN')->addOr($c->getNewCriterion(ApplicationPeer::APP_STATUS, 'COMPLETED')->addAnd($c->getNewCriterion(AppDelegationPeer::DEL_PREVIOUS, 0))));
$c->addDescendingOrderByColumn(ApplicationPeer::APP_NUMBER);
$params = array();
$sSql = BasePeer::createSelectSql($c, $params);
$sSql = BasePeer::createSelectSql($c, $params);
break;
case 'to_revise':
$oCriteria = new Criteria('workflow');
@@ -2933,7 +2937,7 @@ class Cases {
$d->next();
}
}
/*
* it Changes the date and APP_DISABLE_ACTION_USER to unpause cases
*
@@ -2942,14 +2946,14 @@ class Cases {
* @return void
*/
function UnpauseRoutedCasesWithPauseFlagEnabled($usrLogged) {
/*
/*
SELECT * APP_DELAY_UID
FROM APP_DELAY
FROM APP_DELAY
left join APP_DELEGATION ON ( APP_DELAY.APP_UID = APP_DELEGATION.APP_UID AND APP_DELAY.APP_DEL_INDEX = APP_DELEGATION.DEL_INDEX )
WHERE APP_DELEGATION_USER = '00000000000000000000000000000001' and ( APP_DISABLE_ACTION_USER = '0' or isnull(APP_DISABLE_ACTION_USER) ) AND DEL_THREAD_STATUS = 'CLOSED'
APP_DISABLE_ACTION_USER = $usrLogged
APP_DISABLE_ACTION_DATE = NOW*/
$c = new Criteria();
$c->clearSelectColumns();
$c->addSelectColumn(AppDelayPeer::APP_DELAY_UID);
@@ -2973,7 +2977,7 @@ class Cases {
BasePeer::doUpdate($c1, $c2,$con);
}
}
}
/*
@@ -3014,7 +3018,7 @@ class Cases {
return $oApplication->getDelIndex();
}
//if the user is not in the task, we need to return a valid del index, so we are returning the latest delindex
//if the user is not in the task, we need to return a valid del index, so we are returning the latest delindex
$oCriteria = new Criteria();
$oCriteria->add(AppDelegationPeer::APP_UID, $sApplicationUID);
$oCriteria->addDescendingOrderByColumn(AppDelegationPeer::DEL_DELEGATE_DATE);
@@ -3256,11 +3260,11 @@ class Cases {
$oDataset->next();
}
global $_DBArray;
$_DBArray['inputDocuments'] = $aInputDocuments;
$_SESSION['_DBArray'] = $_DBArray;
G::LoadClass('ArrayPeer');
G::LoadClass('ArrayPeer');
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('inputDocuments');
// $oCriteria->addAscendingOrderByColumn(AppDocumentPeer::APP_DOC_CREATE_DATE);
@@ -3396,7 +3400,7 @@ class Cases {
*/
function pauseCase($sApplicationUID, $iDelegation, $sUserUID, $sUnpauseDate = null) {
$this->CloseCurrentDelegation($sApplicationUID, $iDelegation);
$oApplication = new Application();
$aFields = $oApplication->Load($sApplicationUID);
@@ -3423,9 +3427,9 @@ class Cases {
$aData['APP_ENABLE_ACTION_DATE'] = date('Y-m-d H:i:s');
$aData['APP_DISABLE_ACTION_DATE'] = $sUnpauseDate;
$oAppDelay = new AppDelay();
$oAppDelay->create($aData);
$aFields['APP_STATUS'] = 'PAUSED';
$oAppDelay->create($aData);
$aFields['APP_STATUS'] = 'PAUSED';
$oApplication->update($aFields);
//update searchindex
@@ -3471,7 +3475,7 @@ class Cases {
$oCriteria = new Criteria('workflow');
$oCriteria->clearSelectColumns();
$oCriteria->addSelectColumn(AppDelayPeer::APP_DELAY_UID);
$oCriteria->addSelectColumn(AppDelayPeer::APP_THREAD_INDEX);
$oCriteria->addSelectColumn(AppDelayPeer::APP_THREAD_INDEX);
$oCriteria->addSelectColumn(AppDelayPeer::APP_STATUS);
$oCriteria->add(AppDelayPeer::APP_UID, $sApplicationUID);
$oCriteria->add(AppDelayPeer::APP_DEL_INDEX, $iDelegation);
@@ -3480,12 +3484,12 @@ class Cases {
$oDataset = AppDelayPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRow = $oDataset->getRow();
$oApplication = new Application();
$aFields = $oApplication->Load($sApplicationUID);
$aFields['APP_STATUS'] = $aRow['APP_STATUS'];
$oApplication->update($aFields);
$aRow = $oDataset->getRow();
$oApplication = new Application();
$aFields = $oApplication->Load($sApplicationUID);
$aFields['APP_STATUS'] = $aRow['APP_STATUS'];
$oApplication->update($aFields);
//update the DEL_INDEX ? in APP_THREAD table?
$aUpdate = array('APP_UID' => $sApplicationUID, 'APP_THREAD_INDEX' => $aRow['APP_THREAD_INDEX'], 'DEL_INDEX' => $iIndex);
@@ -3497,7 +3501,7 @@ class Cases {
$aData['APP_DISABLE_ACTION_DATE'] = date('Y-m-d H:i:s');
$oAppDelay = new AppDelay();
$aFieldsDelay = $oAppDelay->update($aData);
//update searchindex
if($this->appSolr != null)
$this->appSolr->updateApplicationSearchIndex($sApplicationUID);
@@ -3514,7 +3518,7 @@ class Cases {
*/
function cancelCase($sApplicationUID, $iIndex, $user_logged) {
$oApplication = new Application();
$aFields = $oApplication->load($sApplicationUID);
$oCriteria = new Criteria('workflow');
@@ -3571,7 +3575,7 @@ class Cases {
$oDerivation = new Derivation();
$oDerivation->verifyIsCaseChild($sApplicationUID);
}
//update searchindex
if($this->appSolr != null)
$this->appSolr->updateApplicationSearchIndex($sApplicationUID);
@@ -3588,7 +3592,7 @@ class Cases {
*/
function reactivateCase($sApplicationUID, $iIndex, $user_logged) {
$oApplication = new Application();
$aFields = $oApplication->load((isset($_POST['sApplicationUID']) ? $_POST['sApplicationUID'] : $_SESSION['APPLICATION']));
$aFields['APP_STATUS'] = 'TO_DO';
@@ -3622,7 +3626,7 @@ class Cases {
$sql = "UPDATE APP_THREAD SET APP_THREAD_STATUS = 'OPEN' WHERE APP_UID = '$sApplicationUID' AND DEL_INDEX ='$iIndex' ";
$stmt = $con->createStatement();
$rs = $stmt->executeQuery($sql, ResultSet::FETCHMODE_ASSOC);
//update searchindex
if($this->appSolr != null)
$this->appSolr->updateApplicationSearchIndex($sApplicationUID);
@@ -3641,7 +3645,7 @@ class Cases {
*/
function reassignCase($sApplicationUID, $iDelegation, $sUserUID, $newUserUID, $sType = 'REASSIGN') {
$this->CloseCurrentDelegation($sApplicationUID, $iDelegation);
$oAppDelegation = new AppDelegation();
$aFieldsDel = $oAppDelegation->Load($sApplicationUID, $iDelegation);
@@ -3674,11 +3678,11 @@ class Cases {
$aData['APP_ENABLE_ACTION_DATE'] = date('Y-m-d H:i:s');
$oAppDelay = new AppDelay();
$oAppDelay->create($aData);
//update searchindex
if($this->appSolr != null)
$this->appSolr->updateApplicationSearchIndex($sApplicationUID);
$this->appSolr->updateApplicationSearchIndex($sApplicationUID);
return true;
}
@@ -3687,7 +3691,7 @@ class Cases {
*
* @name getAllDynaformsStepsToRevise
* @param string $APP_UID
* @return object
* @return object
*/
function getAllDynaformsStepsToRevise($APP_UID) {
@@ -3711,7 +3715,7 @@ class Cases {
*
* @name getAllInputsStepsToRevise
* @param string $APP_UID
* @return object
* @return object
*/
function getAllInputsStepsToRevise($APP_UID) {
@@ -3735,7 +3739,7 @@ class Cases {
*
* @name getAllUploadedDocumentsCriteria
* @param string $APP_UID
* @return object
* @return object
*/
function getAllUploadedDocumentsCriteria($sProcessUID, $sApplicationUID, $sTasKUID, $sUserUID) {
@@ -4105,13 +4109,13 @@ class Cases {
'DOWNLOAD_LINK' => $firstDocLink,
'DOWNLOAD_FILE' => $aAux['APP_DOC_FILENAME'] . $firstDocLabel
);
if (trim($fileDocLabel)!='')
$aFields['FILEDOCLABEL'] = $fileDocLabel;
if (trim($filePdfLabel)!='')
$aFields['FILEPDFLABEL'] = $filePdfLabel;
if ($aFields['APP_DOC_FILENAME'] != '') {
$aFields['TITLE'] = $aFields['APP_DOC_FILENAME'];
} else {
@@ -4120,7 +4124,7 @@ class Cases {
$aFields['POSITION'] = $_SESSION['STEP_POSITION'];
$aFields['CONFIRM'] = G::LoadTranslation('ID_CONFIRM_DELETE_ELEMENT');
if (in_array($aRow['APP_DOC_UID'], $aObjectPermissions['OUTPUT_DOCUMENTS'])) {
if (in_array($aRow['APP_DOC_UID'], $aDelete['OUTPUT_DOCUMENTS']))
if (in_array($aRow['APP_DOC_UID'], $aDelete['OUTPUT_DOCUMENTS']))
$aFields['ID_DELETE'] = G::LoadTranslation('ID_DELETE');
}
$aOutputDocuments[] = $aFields;
@@ -4183,19 +4187,19 @@ class Cases {
$oCriteria->addJoin(StepPeer::STEP_UID_OBJ, DynaformPeer::DYN_UID);
$oCriteria->add(StepPeer::STEP_TYPE_OBJ, 'DYNAFORM');
$oCriteria->add(StepPeer::STEP_UID_OBJ, $aObjectPermissions['DYNAFORMS'], Criteria::IN);
//These fields are missing now is completed
$oCriteria->addSelectColumn(DynaformPeer::DYN_UID);
$oCriteria->addSelectColumn(DynaformPeer::DYN_TYPE);
$oCriteria->addSelectColumn(DynaformPeer::DYN_FILENAME);
$oCriteria->addSelectColumn(ApplicationPeer::PRO_UID);
///-- Adding column STEP_POSITION for standardization
$oCriteria->addSelectColumn(StepPeer::STEP_POSITION);
//These fields are missing now is completed
$oCriteria->addSelectColumn(DynaformPeer::DYN_UID);
$oCriteria->addSelectColumn(DynaformPeer::DYN_TYPE);
$oCriteria->addSelectColumn(DynaformPeer::DYN_FILENAME);
$oCriteria->addSelectColumn(ApplicationPeer::PRO_UID);
///-- Adding column STEP_POSITION for standardization
$oCriteria->addSelectColumn(StepPeer::STEP_POSITION);
$oCriteria->addAscendingOrderByColumn(StepPeer::STEP_POSITION);
$oCriteria->setDistinct();
$oDataset = DynaformPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
@@ -4215,12 +4219,12 @@ class Cases {
$aFields['TAS_UID'] = $sTasKUID;
$aInputDocuments[] = $aFields;
$oDataset->next();
}
}
$distinctArray = $aInputDocuments;
$distinctArrayBase = $aInputDocuments;
$distinctOriginal = array();
foreach($distinctArray as $distinctArrayKey=>$distinctArrayValue) {
foreach($distinctArray as $distinctArrayKey=>$distinctArrayValue) {
$distinctOriginalPush = 1;
foreach($distinctOriginal as $distinctOriginalKey=>$distinctOriginalValue) {
if($distinctArrayValue == $distinctOriginalValue){
@@ -4230,8 +4234,8 @@ class Cases {
if($distinctOriginalPush==1){
$distinctOriginal[] = $distinctArrayValue;
}
}
$aInputDocuments = $distinctOriginal;
}
$aInputDocuments = $distinctOriginal;
global $_DBArray;
$_DBArray['Dynaforms'] = $aInputDocuments;
@@ -4274,36 +4278,36 @@ class Cases {
$aConfiguration = $oConfiguration->load('Emails', '', '', '', '');
if ($aConfiguration['CFG_VALUE'] != '') {
$aConfiguration = unserialize($aConfiguration["CFG_VALUE"]);
$passwd = $aConfiguration["MESS_PASSWORD"];
$passwdDec = G::decrypt($passwd, "EMAILENCRYPT");
if (strpos($passwdDec, "hash:") !== false) {
list($hash, $pass) = explode(":", $passwdDec);
$passwd = $pass;
}
$aConfiguration["MESS_PASSWORD"] = $passwd;
} else {
$aConfiguration = array();
}
}
if (!isset($aConfiguration['MESS_ENABLED']) || $aConfiguration['MESS_ENABLED'] != '1') {
return false;
}
//Send derivation notification - Start
$oTask = new Task();
$aTaskInfo = $oTask->load($sCurrentTask);
if ($aTaskInfo['TAS_SEND_LAST_EMAIL'] != 'TRUE') {
return false;
}
if ($sFrom == '') {
$sFrom = '"ProcessMaker"';
}
if (($aConfiguration['MESS_ENGINE'] != 'MAIL') && ($aConfiguration['MESS_ACCOUNT'] != '')) {
$sFrom .= ' <' . $aConfiguration['MESS_ACCOUNT'] . '>';
} else {
@@ -4321,7 +4325,7 @@ class Cases {
}
}
}
if (isset($aTaskInfo['TAS_DEF_SUBJECT_MESSAGE']) && $aTaskInfo['TAS_DEF_SUBJECT_MESSAGE'] != '') {
$sSubject = G::replaceDataField($aTaskInfo['TAS_DEF_SUBJECT_MESSAGE'], $aFields);
} else {
@@ -4333,8 +4337,8 @@ class Cases {
$oConf = new Configurations;
$oConf->loadConfig($x, 'TAS_EXTRA_PROPERTIES', $aTaskInfo['TAS_UID'], '', '');
$conf = $oConf->aConfig;
if( isset($conf['TAS_DEF_MESSAGE_TYPE']) && isset($conf['TAS_DEF_MESSAGE_TEMPLATE'])
if( isset($conf['TAS_DEF_MESSAGE_TYPE']) && isset($conf['TAS_DEF_MESSAGE_TEMPLATE'])
&& $conf['TAS_DEF_MESSAGE_TYPE'] == 'template' && $conf['TAS_DEF_MESSAGE_TEMPLATE'] != '') {
$pathEmail = PATH_DATA_SITE . 'mailTemplates' . PATH_SEP . $aTaskInfo['PRO_UID'] . PATH_SEP;
@@ -4343,7 +4347,7 @@ class Cases {
if ( ! file_exists ( $fileTemplate ) ) {
throw new Exception("Template file '$fileTemplate' does not exist.");
}
$sBody = G::replaceDataField(file_get_contents($fileTemplate), $aFields);
} else {
$sBody = nl2br(G::replaceDataField($aTaskInfo['TAS_DEF_MESSAGE'], $aFields));
@@ -4354,9 +4358,9 @@ class Cases {
foreach ($aTasks as $aTask) {
if (isset($aTask['USR_UID'])) {
$aUser = $oUser->load($aTask['USR_UID']);
$sTo = ((($aUser['USR_FIRSTNAME'] != '') || ($aUser['USR_LASTNAME'] != '')) ? $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'] . ' ' : '') . '<' . $aUser['USR_EMAIL'] . '>';
$oSpool = new spoolRun();
$oSpool->setConfig(array('MESS_ENGINE' => $aConfiguration['MESS_ENGINE'],
'MESS_SERVER' => $aConfiguration['MESS_SERVER'],
@@ -4385,9 +4389,9 @@ class Cases {
}
}
}
//Send derivation notification - End
} catch (Exception $oException) {
throw $oException;
}
@@ -4740,7 +4744,7 @@ class Cases {
function verifyTable()
{
$oCriteria = new Criteria('workflow');
$del = DBAdapter::getStringDelimiter();
@@ -4750,7 +4754,7 @@ class Cases {
$oDataBase = new database();
$sql = $oDataBase->createTableObjectPermission();
}
/*
$sql = "CREATE TABLE IF NOT EXISTS `OBJECT_PERMISSION` (
`OP_UID` varchar(32) NOT NULL,
@@ -5001,18 +5005,18 @@ class Cases {
}
/*
* funcion History messages for case tracker ExtJS
* funcion History messages for case tracker ExtJS
* @name getHistoryMessagesTrackerExt
* @param string sApplicationUID
* @param string Msg_UID
* @return array
*/
function getHistoryMessagesTrackerExt($sApplicationUID) {
G::LoadClass('ArrayPeer');
global $_DBArray;
$oAppDocument = new AppDocument();
$oCriteria = new Criteria('workflow');
$oCriteria->add(AppMessagePeer::APP_UID, $sApplicationUID);
@@ -5022,7 +5026,7 @@ class Cases {
$oDataset->next();
$aMessages = array();
while ($aRow = $oDataset->getRow()) {
$aMessages[] = array('APP_MSG_UID' => $aRow['APP_MSG_UID'],
'APP_UID' => $aRow['APP_UID'],
@@ -5041,16 +5045,16 @@ class Cases {
);
$oDataset->next();
}
$_DBArray['messages'] = $aMessages;
$_SESSION['_DBArray'] = $_DBArray;
$oCriteria = new Criteria('dbarray');
$oCriteria->setDBArrayTable('messages');
return $aMessages;
}
/*
* funcion History messages for case tracker
* by Everth The Answer
@@ -5130,7 +5134,7 @@ class Cases {
*/
function executeTriggersAfterExternal($sProcess, $sTask, $sApplication, $iIndex, $iStepPosition, $aNewData = array()) {
//load the variables
$Fields = $this->loadCase($sApplication);
$Fields['APP_DATA'] = array_merge($Fields['APP_DATA'], G::getSystemConstants());
@@ -5147,7 +5151,7 @@ class Cases {
$aData['DEL_INDEX'] = $iIndex;
$aData['TAS_UID'] = $sTask;
$this->updateCase($sApplication, $aData);
}
/*
@@ -5187,7 +5191,7 @@ class Cases {
G::SendMessageText(G::LoadTranslation('ID_CASE_IS_CURRENTLY_WITH_ANOTHER_USER') . ': ' . $aData['USR_FIRSTNAME'] . ' ' . $aData['USR_LASTNAME'] . ' (' . $aData['USR_USERNAME'] . ')', 'error');
G::header('Location: ' . $sURL);
die;
}
}
else {
$c->add(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL);
if (!(boolean) AppDelegationPeer::doCount($c)) {
@@ -5430,7 +5434,7 @@ class Cases {
$c->addSelectColumn(AppDelegationPeer::APP_UID);
$c->add(AppDelegationPeer::APP_UID, $sAppUid);
$c->add(AppDelegationPeer::USR_UID, $sUIDUserLogged);
$rs = ApplicationPeer::doSelectRS($c);
$count = 0;
while ($rs->next())
@@ -5500,13 +5504,13 @@ class Cases {
}
function discriminateCases($aData){
$siblingThreadData = $this->GetAllOpenDelegation($aData);
foreach($siblingThreadData as $thread => $threadData)
{
$this->closeAppThread ( $aData['APP_UID'], $threadData['DEL_INDEX']); //Close Sibling AppThreads
$this->CloseCurrentDelegation ($aData['APP_UID'], $threadData['DEL_INDEX']); //Close Sibling AppDelegations
//update searchindex
if($this->appSolr != null)
$this->appSolr->updateApplicationSearchIndex($aData['APP_UID']);
@@ -5545,8 +5549,8 @@ class Cases {
throw ($e);
}
}
function getUsersToReassign($TAS_UID, $USR_UID)
{
G::LoadClass('groups');
@@ -5580,15 +5584,15 @@ class Cases {
$c->addSelectColumn(UsersPeer::USR_FIRSTNAME);
$c->addSelectColumn(UsersPeer::USR_LASTNAME);
$c->add(UsersPeer::USR_UID, $row, Criteria::IN);
$rs = UsersPeer::doSelectRs($c);
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rows = Array();
while( $rs->next() ) {
$rows[] = $rs->getRow();
}
return $rows;
}
/*
@@ -5603,17 +5607,17 @@ class Cases {
$c = new Criteria('workflow');
$c->addSelectColumn(AppDelegationPeer::APP_UID);
$c->addSelectColumn(AppDelegationPeer::USR_UID);
$c->addSelectColumn(UsersPeer::USR_USERNAME);
$c->addSelectColumn(UsersPeer::USR_EMAIL);
$c->add(AppDelegationPeer::APP_UID, $sAppUid, CRITERIA::EQUAL);
$c->addJoin(AppDelegationPeer::USR_UID, UsersPeer::USR_UID, Criteria::LEFT_JOIN);
$rs = AppDelegationPeer::doSelectRS($c);
$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rows=array();
@@ -5626,7 +5630,7 @@ class Cases {
$response['array']=$rows;
return $response;
}
function getCaseNotes($applicationID, $type = 'array',$userUid = '') {
require_once ( "classes/model/AppNotes.php" );
$appNotes = new AppNotes();
@@ -5671,3 +5675,4 @@ class Cases {
return $response;
}
}