Merge remote branch 'upstream/master'

This commit is contained in:
Victor Saisa Lopez
2012-07-13 18:42:23 -04:00
4 changed files with 94 additions and 88 deletions

View File

@@ -1,4 +1,5 @@
<?php <?php
require_once PATH_TRUNK . 'gulliver/thirdparty/smarty/libs/Smarty.class.php'; require_once PATH_TRUNK . 'gulliver/thirdparty/smarty/libs/Smarty.class.php';
require_once PATH_TRUNK . 'gulliver/system/class.xmlform.php'; require_once PATH_TRUNK . 'gulliver/system/class.xmlform.php';
require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php'; require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php';
@@ -11,156 +12,158 @@ require_once PATH_TRUNK . 'workflow/engine/classes/class.dynaformEditor.php';
/** /**
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:31. * Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:31.
*/ */
class classdynaformEditorTest extends PHPUnit_Framework_TestCase class classdynaformEditorTest extends PHPUnit_Framework_TestCase
{ {
/** /**
* @var dynaformEditor * @var dynaformEditor
*/ */
protected $object; protected $object;
/** /**
* Sets up the fixture, for example, opens a network connection. * Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed. * This method is called before a test is executed.
*/ */
protected function setUp() protected function setUp()
{ {
$this->object = new dynaformEditor(); $this->object = new dynaformEditor('getvalue');
} }
/** /**
* Tears down the fixture, for example, closes a network connection. * Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed. * This method is called after a test is executed.
*/ */
protected function tearDown() protected function tearDown()
{ {
} }
/** /**
* 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. * the same number of methods.
*/ */
public function testNumberOfMethodsInThisClass() public function testNumberOfMethodsInThisClass()
{ {
$methods = get_class_methods('dynaformEditor'); $this->assertTrue( count($methods) == 10); $methods = get_class_methods('dynaformEditor');
$this->assertTrue(count($methods) == 10);
} }
/** /**
* @covers dynaformEditor::dynaformEditor * @covers dynaformEditor::dynaformEditor
* @todo Implement testdynaformEditor(). * @todo Implement testdynaformEditor().
*/ */
public function testdynaformEditor() public function testdynaformEditor()
{ {
$methods = get_class_methods($this->object); $methods = get_class_methods($this->object);
$this->assertTrue( in_array('dynaformEditor', $methods ), 'exists method dynaformEditor' ); $this->assertTrue(in_array('dynaformEditor', $methods), 'exists method dynaformEditor');
$r = new ReflectionMethod('dynaformEditor', 'dynaformEditor'); $r = new ReflectionMethod('dynaformEditor', 'dynaformEditor');
$params = $r->getParameters(); $params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'get'); $this->assertTrue($params[0]->getName() == 'get');
$this->assertTrue( $params[0]->isArray() == false); $this->assertTrue($params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false); $this->assertTrue($params[0]->isOptional() == false);
} }
/** /**
* @covers dynaformEditor::_createDefaultXmlForm * @covers dynaformEditor::_createDefaultXmlForm
* @todo Implement test_createDefaultXmlForm(). * @todo Implement test_createDefaultXmlForm().
*/ */
public function test_createDefaultXmlForm() public function test_createDefaultXmlForm()
{ {
$methods = get_class_methods($this->object); $methods = get_class_methods($this->object);
$this->assertTrue( in_array('_createDefaultXmlForm', $methods ), 'exists method _createDefaultXmlForm' ); $this->assertTrue(in_array('_createDefaultXmlForm', $methods), 'exists method _createDefaultXmlForm');
$r = new ReflectionMethod('dynaformEditor', '_createDefaultXmlForm'); $r = new ReflectionMethod('dynaformEditor', '_createDefaultXmlForm');
$params = $r->getParameters(); $params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'fileName'); $this->assertTrue($params[0]->getName() == 'fileName');
$this->assertTrue( $params[0]->isArray() == false); $this->assertTrue($params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false); $this->assertTrue($params[0]->isOptional() == false);
} }
/** /**
* @covers dynaformEditor::_render * @covers dynaformEditor::_render
* @todo Implement test_render(). * @todo Implement test_render().
*/ */
public function test_render() public function test_render()
{ {
$methods = get_class_methods($this->object); $methods = get_class_methods($this->object);
$this->assertTrue( in_array('_render', $methods ), 'exists method _render' ); $this->assertTrue(in_array('_render', $methods), 'exists method _render');
$r = new ReflectionMethod('dynaformEditor', '_render'); $r = new ReflectionMethod('dynaformEditor', '_render');
$params = $r->getParameters(); $params = $r->getParameters();
} }
/** /**
* @covers dynaformEditor::_getFilename * @covers dynaformEditor::_getFilename
* @todo Implement test_getFilename(). * @todo Implement test_getFilename().
*/ */
public function test_getFilename() public function test_getFilename()
{ {
$methods = get_class_methods($this->object); $methods = get_class_methods($this->object);
$this->assertTrue( in_array('_getFilename', $methods ), 'exists method _getFilename' ); $this->assertTrue(in_array('_getFilename', $methods), 'exists method _getFilename');
$r = new ReflectionMethod('dynaformEditor', '_getFilename'); $r = new ReflectionMethod('dynaformEditor', '_getFilename');
$params = $r->getParameters(); $params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'file'); $this->assertTrue($params[0]->getName() == 'file');
$this->assertTrue( $params[0]->isArray() == false); $this->assertTrue($params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false); $this->assertTrue($params[0]->isOptional() == false);
} }
/** /**
* @covers dynaformEditor::_setUseTemporalCopy * @covers dynaformEditor::_setUseTemporalCopy
* @todo Implement test_setUseTemporalCopy(). * @todo Implement test_setUseTemporalCopy().
*/ */
public function test_setUseTemporalCopy() public function test_setUseTemporalCopy()
{ {
$methods = get_class_methods($this->object); $methods = get_class_methods($this->object);
$this->assertTrue( in_array('_setUseTemporalCopy', $methods ), 'exists method _setUseTemporalCopy' ); $this->assertTrue(in_array('_setUseTemporalCopy', $methods), 'exists method _setUseTemporalCopy');
$r = new ReflectionMethod('dynaformEditor', '_setUseTemporalCopy'); $r = new ReflectionMethod('dynaformEditor', '_setUseTemporalCopy');
$params = $r->getParameters(); $params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'onOff'); $this->assertTrue($params[0]->getName() == 'onOff');
$this->assertTrue( $params[0]->isArray() == false); $this->assertTrue($params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false); $this->assertTrue($params[0]->isOptional() == false);
} }
/** /**
* @covers dynaformEditor::_setTmpData * @covers dynaformEditor::_setTmpData
* @todo Implement test_setTmpData(). * @todo Implement test_setTmpData().
*/ */
public function test_setTmpData() public function test_setTmpData()
{ {
$methods = get_class_methods($this->object); $methods = get_class_methods($this->object);
$this->assertTrue( in_array('_setTmpData', $methods ), 'exists method _setTmpData' ); $this->assertTrue(in_array('_setTmpData', $methods), 'exists method _setTmpData');
$r = new ReflectionMethod('dynaformEditor', '_setTmpData'); $r = new ReflectionMethod('dynaformEditor', '_setTmpData');
$params = $r->getParameters(); $params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'data'); $this->assertTrue($params[0]->getName() == 'data');
$this->assertTrue( $params[0]->isArray() == false); $this->assertTrue($params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false); $this->assertTrue($params[0]->isOptional() == false);
} }
/** /**
* @covers dynaformEditor::_getTmpData * @covers dynaformEditor::_getTmpData
* @todo Implement test_getTmpData(). * @todo Implement test_getTmpData().
*/ */
public function test_getTmpData() public function test_getTmpData()
{ {
$methods = get_class_methods($this->object); $methods = get_class_methods($this->object);
$this->assertTrue( in_array('_getTmpData', $methods ), 'exists method _getTmpData' ); $this->assertTrue(in_array('_getTmpData', $methods), 'exists method _getTmpData');
$r = new ReflectionMethod('dynaformEditor', '_getTmpData'); $r = new ReflectionMethod('dynaformEditor', '_getTmpData');
$params = $r->getParameters(); $params = $r->getParameters();
} }
/** /**
* @covers dynaformEditor::_copyFile * @covers dynaformEditor::_copyFile
* @todo Implement test_copyFile(). * @todo Implement test_copyFile().
*/ */
public function test_copyFile() public function test_copyFile()
{ {
$methods = get_class_methods($this->object); $methods = get_class_methods($this->object);
$this->assertTrue( in_array('_copyFile', $methods ), 'exists method _copyFile' ); $this->assertTrue(in_array('_copyFile', $methods), 'exists method _copyFile');
$r = new ReflectionMethod('dynaformEditor', '_copyFile'); $r = new ReflectionMethod('dynaformEditor', '_copyFile');
$params = $r->getParameters(); $params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'from'); $this->assertTrue($params[0]->getName() == 'from');
$this->assertTrue( $params[0]->isArray() == false); $this->assertTrue($params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false); $this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue( $params[1]->getName() == 'to'); $this->assertTrue($params[1]->getName() == 'to');
$this->assertTrue( $params[1]->isArray() == false); $this->assertTrue($params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false); $this->assertTrue($params[1]->isOptional() == false);
} }
}
}

View File

@@ -26,7 +26,7 @@ class classgzip_fileTest extends PHPUnit_Framework_TestCase
*/ */
protected function setUp() protected function setUp()
{ {
$this->object = new gzip_file(); $this->object = new gzip_file('name');
} }
/** /**
@@ -43,7 +43,8 @@ class classgzip_fileTest extends PHPUnit_Framework_TestCase
*/ */
public function testNumberOfMethodsInThisClass() public function testNumberOfMethodsInThisClass()
{ {
$methods = get_class_methods('gzip_file'); $this->assertTrue( count($methods) == 18); $methods = get_class_methods('gzip_file');
$this->assertTrue( count($methods) == 18);
} }
/** /**
@@ -59,7 +60,7 @@ class classgzip_fileTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'name'); $this->assertTrue( $params[0]->getName() == 'name');
$this->assertTrue( $params[0]->isArray() == false); $this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false); $this->assertTrue( $params[0]->isOptional () == false);
} }
/** /**
* @covers gzip_file::create_gzip * @covers gzip_file::create_gzip
@@ -71,7 +72,7 @@ class classgzip_fileTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('create_gzip', $methods ), 'exists method create_gzip' ); $this->assertTrue( in_array('create_gzip', $methods ), 'exists method create_gzip' );
$r = new ReflectionMethod('gzip_file', 'create_gzip'); $r = new ReflectionMethod('gzip_file', 'create_gzip');
$params = $r->getParameters(); $params = $r->getParameters();
} }
/** /**
* @covers gzip_file::open_archive * @covers gzip_file::open_archive
@@ -83,6 +84,6 @@ class classgzip_fileTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('open_archive', $methods ), 'exists method open_archive' ); $this->assertTrue( in_array('open_archive', $methods ), 'exists method open_archive' );
$r = new ReflectionMethod('gzip_file', 'open_archive'); $r = new ReflectionMethod('gzip_file', 'open_archive');
$params = $r->getParameters(); $params = $r->getParameters();
} }
}
}

View File

@@ -26,7 +26,7 @@ class classstepDetailTest extends PHPUnit_Framework_TestCase
*/ */
protected function setUp() protected function setUp()
{ {
$this->object = new stepDetail(); $this->object = new stepDetail('nameSpace', 'stepId', 'stepName', 'stepTitle', 'setupStepPage');
} }
/** /**
@@ -43,7 +43,8 @@ class classstepDetailTest extends PHPUnit_Framework_TestCase
*/ */
public function testNumberOfMethodsInThisClass() public function testNumberOfMethodsInThisClass()
{ {
$methods = get_class_methods('stepDetail'); $this->assertTrue( count($methods) == 1); $methods = get_class_methods('stepDetail');
$this->assertTrue( count($methods) == 1);
} }
/** /**
@@ -71,6 +72,6 @@ class classstepDetailTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[4]->getName() == 'sSetupStepPage'); $this->assertTrue( $params[4]->getName() == 'sSetupStepPage');
$this->assertTrue( $params[4]->isArray() == false); $this->assertTrue( $params[4]->isArray() == false);
$this->assertTrue( $params[4]->isOptional () == false); $this->assertTrue( $params[4]->isOptional () == false);
} }
}
}

View File

@@ -26,7 +26,7 @@ class classtar_fileTest extends PHPUnit_Framework_TestCase
*/ */
protected function setUp() protected function setUp()
{ {
$this->object = new tar_file(); $this->object = new tar_file('name');
} }
/** /**
@@ -43,7 +43,8 @@ class classtar_fileTest extends PHPUnit_Framework_TestCase
*/ */
public function testNumberOfMethodsInThisClass() public function testNumberOfMethodsInThisClass()
{ {
$methods = get_class_methods('tar_file'); $this->assertTrue( count($methods) == 16); $methods = get_class_methods('tar_file');
$this->assertTrue( count($methods) == 16);
} }
/** /**
@@ -59,7 +60,7 @@ class classtar_fileTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'name'); $this->assertTrue( $params[0]->getName() == 'name');
$this->assertTrue( $params[0]->isArray() == false); $this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false); $this->assertTrue( $params[0]->isOptional () == false);
} }
/** /**
* @covers tar_file::create_tar * @covers tar_file::create_tar
@@ -71,7 +72,7 @@ class classtar_fileTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('create_tar', $methods ), 'exists method create_tar' ); $this->assertTrue( in_array('create_tar', $methods ), 'exists method create_tar' );
$r = new ReflectionMethod('tar_file', 'create_tar'); $r = new ReflectionMethod('tar_file', 'create_tar');
$params = $r->getParameters(); $params = $r->getParameters();
} }
/** /**
* @covers tar_file::extract_files * @covers tar_file::extract_files
@@ -83,7 +84,7 @@ class classtar_fileTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('extract_files', $methods ), 'exists method extract_files' ); $this->assertTrue( in_array('extract_files', $methods ), 'exists method extract_files' );
$r = new ReflectionMethod('tar_file', 'extract_files'); $r = new ReflectionMethod('tar_file', 'extract_files');
$params = $r->getParameters(); $params = $r->getParameters();
} }
/** /**
* @covers tar_file::open_archive * @covers tar_file::open_archive
@@ -95,6 +96,6 @@ class classtar_fileTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('open_archive', $methods ), 'exists method open_archive' ); $this->assertTrue( in_array('open_archive', $methods ), 'exists method open_archive' );
$r = new ReflectionMethod('tar_file', 'open_archive'); $r = new ReflectionMethod('tar_file', 'open_archive');
$params = $r->getParameters(); $params = $r->getParameters();
} }
}
}