fixing all gulliver phpunits
This commit is contained in:
@@ -26,7 +26,9 @@ class classTemplatePowerParserTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
$this->object = new TemplatePowerParser();
|
$tpl_file='';
|
||||||
|
$type='';
|
||||||
|
$this->object = new TemplatePowerParser($tpl_file, $type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -38,7 +40,7 @@ class classTemplatePowerParserTest 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.
|
* the same number of methods.
|
||||||
*/
|
*/
|
||||||
public function testNumberOfMethodsInThisClass()
|
public function testNumberOfMethodsInThisClass()
|
||||||
@@ -62,7 +64,7 @@ class classTemplatePowerParserTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[1]->getName() == 'type');
|
$this->assertTrue( $params[1]->getName() == 'type');
|
||||||
$this->assertTrue( $params[1]->isArray() == false);
|
$this->assertTrue( $params[1]->isArray() == false);
|
||||||
$this->assertTrue( $params[1]->isOptional () == false);
|
$this->assertTrue( $params[1]->isOptional () == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers TemplatePowerParser::__errorAlert
|
* @covers TemplatePowerParser::__errorAlert
|
||||||
@@ -77,7 +79,7 @@ class classTemplatePowerParserTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[0]->getName() == 'message');
|
$this->assertTrue( $params[0]->getName() == 'message');
|
||||||
$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 TemplatePowerParser::__prepare
|
* @covers TemplatePowerParser::__prepare
|
||||||
@@ -89,7 +91,7 @@ class classTemplatePowerParserTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('__prepare', $methods ), 'exists method __prepare' );
|
$this->assertTrue( in_array('__prepare', $methods ), 'exists method __prepare' );
|
||||||
$r = new ReflectionMethod('TemplatePowerParser', '__prepare');
|
$r = new ReflectionMethod('TemplatePowerParser', '__prepare');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers TemplatePowerParser::__cleanUp
|
* @covers TemplatePowerParser::__cleanUp
|
||||||
@@ -101,7 +103,7 @@ class classTemplatePowerParserTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('__cleanUp', $methods ), 'exists method __cleanUp' );
|
$this->assertTrue( in_array('__cleanUp', $methods ), 'exists method __cleanUp' );
|
||||||
$r = new ReflectionMethod('TemplatePowerParser', '__cleanUp');
|
$r = new ReflectionMethod('TemplatePowerParser', '__cleanUp');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers TemplatePowerParser::__prepareTemplate
|
* @covers TemplatePowerParser::__prepareTemplate
|
||||||
@@ -119,7 +121,7 @@ class classTemplatePowerParserTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[1]->getName() == 'type');
|
$this->assertTrue( $params[1]->getName() == 'type');
|
||||||
$this->assertTrue( $params[1]->isArray() == false);
|
$this->assertTrue( $params[1]->isArray() == false);
|
||||||
$this->assertTrue( $params[1]->isOptional () == false);
|
$this->assertTrue( $params[1]->isOptional () == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers TemplatePowerParser::__parseTemplate
|
* @covers TemplatePowerParser::__parseTemplate
|
||||||
@@ -140,7 +142,7 @@ class classTemplatePowerParserTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[2]->getName() == 'initdev');
|
$this->assertTrue( $params[2]->getName() == 'initdev');
|
||||||
$this->assertTrue( $params[2]->isArray() == false);
|
$this->assertTrue( $params[2]->isArray() == false);
|
||||||
$this->assertTrue( $params[2]->isOptional () == false);
|
$this->assertTrue( $params[2]->isOptional () == false);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers TemplatePowerParser::version
|
* @covers TemplatePowerParser::version
|
||||||
@@ -152,7 +154,7 @@ class classTemplatePowerParserTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( in_array('version', $methods ), 'exists method version' );
|
$this->assertTrue( in_array('version', $methods ), 'exists method version' );
|
||||||
$r = new ReflectionMethod('TemplatePowerParser', 'version');
|
$r = new ReflectionMethod('TemplatePowerParser', 'version');
|
||||||
$params = $r->getParameters();
|
$params = $r->getParameters();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @covers TemplatePowerParser::assignInclude
|
* @covers TemplatePowerParser::assignInclude
|
||||||
@@ -174,6 +176,6 @@ class classTemplatePowerParserTest extends PHPUnit_Framework_TestCase
|
|||||||
$this->assertTrue( $params[2]->isArray() == false);
|
$this->assertTrue( $params[2]->isArray() == false);
|
||||||
$this->assertTrue( $params[2]->isOptional () == true);
|
$this->assertTrue( $params[2]->isOptional () == true);
|
||||||
$this->assertTrue( $params[2]->getDefaultValue() == '0');
|
$this->assertTrue( $params[2]->getDefaultValue() == '0');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,79 +0,0 @@
|
|||||||
<?php
|
|
||||||
require_once PATH_TRUNK . 'gulliver/thirdparty/smarty/libs/Smarty.class.php';
|
|
||||||
require_once PATH_TRUNK . 'gulliver/system/class.xmlform.php';
|
|
||||||
require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php';
|
|
||||||
require_once PATH_TRUNK . 'gulliver/system/class.form.php';
|
|
||||||
require_once PATH_TRUNK . 'gulliver/system/class.dbconnection.php';
|
|
||||||
require_once PATH_TRUNK . 'gulliver/thirdparty/propel/Propel.php';
|
|
||||||
require_once PATH_TRUNK . 'gulliver/thirdparty/creole/Creole.php';
|
|
||||||
require_once PATH_TRUNK . 'gulliver/thirdparty/pear/PEAR.php';
|
|
||||||
require_once PATH_TRUNK . 'gulliver/system/class.webResource.php';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:22.
|
|
||||||
*/
|
|
||||||
|
|
||||||
class classWebResourceTest extends PHPUnit_Framework_TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* @var WebResource
|
|
||||||
*/
|
|
||||||
protected $object;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets up the fixture, for example, opens a network connection.
|
|
||||||
* This method is called before a test is executed.
|
|
||||||
*/
|
|
||||||
protected function setUp()
|
|
||||||
{
|
|
||||||
$this->object = new WebResource();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Tears down the fixture, for example, closes a network connection.
|
|
||||||
* This method is called after a test is executed.
|
|
||||||
*/
|
|
||||||
protected function tearDown()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is the default method to test, if the class still having
|
|
||||||
* the same number of methods.
|
|
||||||
*/
|
|
||||||
public function testNumberOfMethodsInThisClass()
|
|
||||||
{
|
|
||||||
$methods = get_class_methods('WebResource'); $this->assertTrue( count($methods) == 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers WebResource::WebResource
|
|
||||||
* @todo Implement testWebResource().
|
|
||||||
*/
|
|
||||||
public function testWebResource()
|
|
||||||
{
|
|
||||||
$methods = get_class_methods($this->object);
|
|
||||||
$this->assertTrue( in_array('WebResource', $methods ), 'exists method WebResource' );
|
|
||||||
$r = new ReflectionMethod('WebResource', 'WebResource');
|
|
||||||
$params = $r->getParameters();
|
|
||||||
$this->assertTrue( $params[0]->getName() == 'uri');
|
|
||||||
$this->assertTrue( $params[0]->isArray() == false);
|
|
||||||
$this->assertTrue( $params[0]->isOptional () == false);
|
|
||||||
$this->assertTrue( $params[1]->getName() == 'post');
|
|
||||||
$this->assertTrue( $params[1]->isArray() == false);
|
|
||||||
$this->assertTrue( $params[1]->isOptional () == false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @covers WebResource::_encode
|
|
||||||
* @todo Implement test_encode().
|
|
||||||
*/
|
|
||||||
public function test_encode()
|
|
||||||
{
|
|
||||||
$methods = get_class_methods($this->object);
|
|
||||||
$this->assertTrue( in_array('_encode', $methods ), 'exists method _encode' );
|
|
||||||
$r = new ReflectionMethod('WebResource', '_encode');
|
|
||||||
$params = $r->getParameters();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -26,7 +26,6 @@ class classxmlMenuTest extends PHPUnit_Framework_TestCase
|
|||||||
*/
|
*/
|
||||||
protected function setUp()
|
protected function setUp()
|
||||||
{
|
{
|
||||||
require_once(PATH_TRUNK . 'gulliver/thirdparty/pear/json/class.json.php');
|
|
||||||
$file = 'login/login.xml';
|
$file = 'login/login.xml';
|
||||||
$home = PATH_TRUNK . 'workflow/engine/xmlform/';
|
$home = PATH_TRUNK . 'workflow/engine/xmlform/';
|
||||||
$this->object = new xmlMenu($file, $home);
|
$this->object = new xmlMenu($file, $home);
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ require_once ROOT_PATH . 'gulliver/system/class.dbconnection.php';
|
|||||||
|
|
||||||
//parsingFolder('gulliver/system', 'class.form.php class.objectTemplate.php class.tree.php class.xmlform.php class.filterForm.php');
|
//parsingFolder('gulliver/system', 'class.form.php class.objectTemplate.php class.tree.php class.xmlform.php class.filterForm.php');
|
||||||
parsingFolder('gulliver/system', 'class.database_mssql.php class.database_mysql.php class.htmlArea.php ' .
|
parsingFolder('gulliver/system', 'class.database_mssql.php class.database_mysql.php class.htmlArea.php ' .
|
||||||
'class.dbconnection.php class.dbrecordset.php class.dbsession.php class.soapNtlm.php' );
|
'class.dbconnection.php class.dbrecordset.php class.dbsession.php class.soapNtlm.php class.webResource.php' );
|
||||||
parsingFolder('workflow/engine/classes',
|
parsingFolder('workflow/engine/classes',
|
||||||
'class.xmlfield_Image.php class.groupUser.php class.group.php class.system.php ' .
|
'class.xmlfield_Image.php class.groupUser.php class.group.php class.system.php ' .
|
||||||
'class.ArrayPeer.php class.ArrayPeer.php class.BasePeer.php class.dbConnections.php class.webdav.php');
|
'class.ArrayPeer.php class.ArrayPeer.php class.BasePeer.php class.dbConnections.php class.webdav.php');
|
||||||
|
|||||||
Reference in New Issue
Block a user