Merge pull request #1066 from ralpheav/master

Adding fix for unit-test  +  resolving git conflict
This commit is contained in:
julceslauhub
2012-12-07 08:19:10 -08:00
3 changed files with 32 additions and 4 deletions

24
env_unittest.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
if [ $1 = '-d' ] ; then
export PM_UNIT_DB_USER=root
export PM_UNIT_DB_NAME=wf_ralph
export PM_UNIT_DB_PASS=atopml2005
export PM_UNIT_DB_HOST=localhost
export HTTP_REFERER="http://192.168.11.30:8080"
echo "env unit test set."
bash -i
else
if [ $1 = '-u' ] ; then
unset PM_UNIT_DB_USER
unset PM_UNIT_DB_NAME
unset PM_UNIT_DB_PASS
unset PM_UNIT_DB_HOST
unset HTTP_REFERER
echo "env unit test unset."
bash -i
else
echo "Incorrect parameter, please use -d or -u\n";
fi
fi

View File

@@ -44,7 +44,7 @@ class classGTest extends PHPUnit_Framework_TestCase
public function testNumberOfMethodsInThisClass()
{
$methods = get_class_methods('G');
$this->assertTrue( count($methods) == 139, "now there are " . count($methods) . " methods.");
$this->assertTrue( count($methods) == 133, "now there are " . count($methods) . " methods.");
}
/**

View File

@@ -1,7 +1,7 @@
<?php
// ProcessMaker Test Unit Bootstrap
// Defining the PATH_SEP constant, he we are defining if the the path separator symbol will be '\\' or '/'
define('PATH_SEP', '/');
if (!defined('__DIR__')) {
@@ -77,6 +77,9 @@ set_include_path(
PATH_RBAC_CORE . PATH_SEPARATOR .
get_include_path()
);
// include bootstrap Class
require_once (PATH_GULLIVER . PATH_SEP . 'class.bootstrap.php');
// include Gulliver Class
// require_once( PATH_GULLIVER . PATH_SEP . 'class.g.php');
@@ -291,9 +294,9 @@ Bootstrap::registerClass('BaseStepTrigger', PATH_HOME . "engine/classes/mode
Bootstrap::registerClass('StepTrigger', PATH_HOME . "engine/classes/model/StepTrigger.php");
Bootstrap::registerClass('StepTriggerPeer', PATH_HOME . "engine/classes/model/StepTriggerPeer.php");
Bootstrap::registerClass('SolrRequestData', PATH_HOME . "engine/classes/entities/SolrRequestData.php");
Bootstrap::registerClass('Entity_SolrRequestData', PATH_HOME . "engine/classes/entities/SolrRequestData.php");
Bootstrap::registerClass('SolrUpdateDocument', PATH_HOME . "engine/classes/entities/SolrUpdateDocument.php");
Bootstrap::registerClass('Entity_SolrUpdateDocument',PATH_HOME . "engine/classes/entities/SolrUpdateDocument.php");
Bootstrap::registerClass('BaseSwimlanesElements',PATH_HOME . "engine/classes/model/om/BaseSwimlanesElements.php");
Bootstrap::registerClass('SwimlanesElements', PATH_HOME . "engine/classes/model/SwimlanesElements.php");
@@ -339,3 +342,4 @@ $config = System::getSystemConfiguration ('', '', SYS_SYS);
define ('MEMCACHED_ENABLED', $config ['memcached']);
define ('MEMCACHED_SERVER', $config ['memcached_server']);
define ('TIME_ZONE', $config ['time_zone']);