fixing all automated test units

This commit is contained in:
Fernando
2012-07-14 02:33:26 -04:00
parent f51b1bd72b
commit 67bd51be41
16 changed files with 211 additions and 142 deletions

View File

@@ -42,6 +42,8 @@
<var name="DB_NAME" value="wf_os" />
<var name="DB_USER" value="root" />
<var name="DB_PASS" value="password" />
<var name="PATH_DB" value="tests/shared/" />
<var name="PATH_DATA" value="tests/shared/" />
</php>
<logging>

View File

@@ -44,8 +44,9 @@ class classPMExceptionTest extends PHPUnit_Framework_TestCase
*/
public function testNumberOfMethodsInThisClass()
{
$methods = get_class_methods('PMException');
$this->assertTrue( count($methods) == 8);
$class = new ReflectionClass('PMException');
$methods = $class->getMethods();
$this->assertTrue( count($methods) == 10);
}
/**

View File

@@ -26,7 +26,10 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new AppSolr();
$SolrEnabled = false;
$SolrHost = 'localhost';
$SolrInstance = '';
$this->object = new AppSolr($SolrEnabled, $SolrHost, $SolrInstance);
}
/**
@@ -38,12 +41,13 @@ class classAppSolrTest 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()
{
$methods = get_class_methods('AppSolr'); $this->assertTrue( count($methods) == 25);
$methods = get_class_methods('AppSolr');
$this->assertTrue( count($methods) == 25);
}
/**
@@ -65,7 +69,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->getName() == 'SolrInstance');
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == false);
}
}
/**
* @covers AppSolr::isSolrEnabled
@@ -77,7 +81,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('isSolrEnabled', $methods ), 'exists method isSolrEnabled' );
$r = new ReflectionMethod('AppSolr', 'isSolrEnabled');
$params = $r->getParameters();
}
}
/**
* @covers AppSolr::getAppGridData
@@ -152,7 +156,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[15]->isArray() == false);
$this->assertTrue( $params[15]->isOptional () == true);
$this->assertTrue( $params[15]->getDefaultValue() == '');
}
}
/**
* @covers AppSolr::getCasesCount
@@ -167,7 +171,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'userUid');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers AppSolr::getUserGroups
@@ -182,7 +186,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'usrUID');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers AppSolr::getAppDelegationData
@@ -200,7 +204,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'delIndex');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers AppSolr::getSearchText
@@ -215,7 +219,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'plainSearchText');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers AppSolr::getApplicationDelegationsIndex
@@ -230,7 +234,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'appUID');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers AppSolr::updateApplicationSearchIndex
@@ -245,7 +249,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'aaAPPUIDs');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers AppSolr::deleteApplicationSearchIndex
@@ -260,7 +264,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'appUID');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers AppSolr::createSolrXMLDocument
@@ -275,7 +279,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'aaAPPUIDs');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers AppSolr::buildSearchIndexDocumentPMOS2
@@ -326,7 +330,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[12]->getName() == 'unassignedGroups');
$this->assertTrue( $params[12]->isArray() == false);
$this->assertTrue( $params[12]->isOptional () == false);
}
}
/**
* @covers AppSolr::getApplicationIndexData
@@ -341,7 +345,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'AppUID');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers AppSolr::aaGetMaximun
@@ -371,7 +375,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[4]->isArray() == false);
$this->assertTrue( $params[4]->isOptional () == true);
$this->assertTrue( $params[4]->getDefaultValue() == '');
}
}
/**
* @covers AppSolr::aaGetMinimun
@@ -401,7 +405,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[4]->isArray() == false);
$this->assertTrue( $params[4]->isOptional () == true);
$this->assertTrue( $params[4]->getDefaultValue() == '');
}
}
/**
* @covers AppSolr::aaSearchRecords
@@ -419,7 +423,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'andColumnsConditions');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers AppSolr::getApplicationDelegationData
@@ -434,7 +438,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'AppUID');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers AppSolr::getTaskUnassignedUsersGroupsData
@@ -452,7 +456,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'TaskUID');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers AppSolr::getProcessDynaformFileNames
@@ -467,7 +471,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'ProUID');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers AppSolr::applicationChangedUpdateSolrQueue
@@ -485,7 +489,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'updated');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers AppSolr::synchronizePendingApplications
@@ -497,7 +501,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('synchronizePendingApplications', $methods ), 'exists method synchronizePendingApplications' );
$r = new ReflectionMethod('AppSolr', 'synchronizePendingApplications');
$params = $r->getParameters();
}
}
/**
* @covers AppSolr::getCountApplicationsPMOS2
@@ -509,7 +513,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('getCountApplicationsPMOS2', $methods ), 'exists method getCountApplicationsPMOS2' );
$r = new ReflectionMethod('AppSolr', 'getCountApplicationsPMOS2');
$params = $r->getParameters();
}
}
/**
* @covers AppSolr::getCountApplicationsSearchIndex
@@ -521,7 +525,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('getCountApplicationsSearchIndex', $methods ), 'exists method getCountApplicationsSearchIndex' );
$r = new ReflectionMethod('AppSolr', 'getCountApplicationsSearchIndex');
$params = $r->getParameters();
}
}
/**
* @covers AppSolr::getPagedApplicationUids
@@ -539,7 +543,7 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'pagesize');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers AppSolr::reindexAllApplications
@@ -551,6 +555,6 @@ class classAppSolrTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('reindexAllApplications', $methods ), 'exists method reindexAllApplications' );
$r = new ReflectionMethod('AppSolr', 'reindexAllApplications');
$params = $r->getParameters();
}
}
}
}

View File

@@ -38,13 +38,14 @@ class classApplicationWithoutDelegationRecordsExceptionTest extends PHPUnit_Fram
}
/**
* 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()
{
$methods = get_class_methods('ApplicationWithoutDelegationRecordsException');
$this->assertTrue( count($methods) == 8);
$class = new ReflectionClass('ApplicationWithoutDelegationRecordsException');
$methods = $class->getMethods();
$this->assertTrue( count($methods) == 10);
}
/**

View File

@@ -38,13 +38,14 @@ class classInvalidIndexSearchTextExceptionTest 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()
{
$methods = get_class_methods('InvalidIndexSearchTextException');
$this->assertTrue( count($methods) == 8);
$class = new ReflectionClass('ApplicationWithoutDelegationRecordsException');
$methods = $class->getMethods();
$this->assertTrue( count($methods) == 10);
}
/**

View File

@@ -26,7 +26,8 @@ class classXMLConnectionTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new XMLConnection();
$file = PATH_TRUNK . 'workflow/engine/xmlform/login/login.xml';
$this->object = new XMLConnection($file);
}
/**
@@ -38,12 +39,13 @@ class classXMLConnectionTest 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()
{
$methods = get_class_methods('XMLConnection'); $this->assertTrue( count($methods) == 11);
$methods = get_class_methods('XMLConnection');
$this->assertTrue( count($methods) == 11);
}
/**
@@ -59,7 +61,7 @@ class classXMLConnectionTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'file');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers XMLConnection::query
@@ -74,7 +76,7 @@ class classXMLConnectionTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'sql');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers XMLConnection::sqlLike
@@ -92,7 +94,7 @@ class classXMLConnectionTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'b');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XMLConnection::expandFields
@@ -110,7 +112,7 @@ class classXMLConnectionTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'fieldsList');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XMLConnection::fetchNode
@@ -125,7 +127,7 @@ class classXMLConnectionTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'node');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers XMLConnection::fetchChildren
@@ -140,7 +142,7 @@ class classXMLConnectionTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'node');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers XMLConnection::disconnect
@@ -152,7 +154,7 @@ class classXMLConnectionTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('disconnect', $methods ), 'exists method disconnect' );
$r = new ReflectionMethod('XMLConnection', 'disconnect');
$params = $r->getParameters();
}
}
/**
* @covers XMLConnection::sqlWhereLike
@@ -167,7 +169,7 @@ class classXMLConnectionTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'match');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers XMLConnection::sqlString
@@ -182,7 +184,7 @@ class classXMLConnectionTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'match');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers XMLConnection::insertRow
@@ -200,7 +202,7 @@ class classXMLConnectionTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'values');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
/**
* @covers XMLConnection::updateRow
@@ -218,6 +220,6 @@ class classXMLConnectionTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'values');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -38,12 +38,14 @@ class classXMLResultTest 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()
{
$methods = get_class_methods('XMLResult'); $this->assertTrue( count($methods) == 3);
$class = new ReflectionClass('ApplicationWithoutDelegationRecordsException');
$methods = $class->getMethods();
$this->assertTrue( count($methods) == 10);
}
/**
@@ -59,8 +61,8 @@ class classXMLResultTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'result');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == true);
$this->assertTrue( $params[0]->getDefaultValue() == 'Array');
}
$this->assertTrue( $params[0]->getDefaultValue() == Array());
}
/**
* @covers XMLResult::numRows
@@ -72,7 +74,7 @@ class classXMLResultTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('numRows', $methods ), 'exists method numRows' );
$r = new ReflectionMethod('XMLResult', 'numRows');
$params = $r->getParameters();
}
}
/**
* @covers XMLResult::fetchRow
@@ -87,6 +89,6 @@ class classXMLResultTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'const');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,10 @@ class classcalendarTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new calendar();
$userUid = '';
$proUid = '';
$tasUid = '';
//$this->object = new calendar($userUid, $proUid, $tasUid);
}
/**
@@ -38,12 +41,13 @@ class classcalendarTest 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()
{
$methods = get_class_methods('calendar'); $this->assertTrue( count($methods) == 56);
$methods = get_class_methods('calendar');
$this->assertTrue( count($methods) == 56);
}
/**
@@ -52,7 +56,8 @@ class classcalendarTest extends PHPUnit_Framework_TestCase
*/
public function testcalendar()
{
$methods = get_class_methods($this->object);
//$methods = get_class_methods($this->object);
$methods = get_class_methods('calendar');
$this->assertTrue( in_array('calendar', $methods ), 'exists method calendar' );
$r = new ReflectionMethod('calendar', 'calendar');
$params = $r->getParameters();
@@ -68,7 +73,7 @@ class classcalendarTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == true);
$this->assertTrue( $params[2]->getDefaultValue() == '');
}
}
/**
* @covers calendar::addCalendarLog
@@ -76,14 +81,15 @@ class classcalendarTest extends PHPUnit_Framework_TestCase
*/
public function testaddCalendarLog()
{
$methods = get_class_methods($this->object);
//$methods = get_class_methods($this->object);
$methods = get_class_methods('calendar');
$this->assertTrue( in_array('addCalendarLog', $methods ), 'exists method addCalendarLog' );
$r = new ReflectionMethod('calendar', 'addCalendarLog');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'msg');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers calendar::setupCalendar
@@ -91,7 +97,8 @@ class classcalendarTest extends PHPUnit_Framework_TestCase
*/
public function testsetupCalendar()
{
$methods = get_class_methods($this->object);
//$methods = get_class_methods($this->object);
$methods = get_class_methods('calendar');
$this->assertTrue( in_array('setupCalendar', $methods ), 'exists method setupCalendar' );
$r = new ReflectionMethod('calendar', 'setupCalendar');
$params = $r->getParameters();
@@ -104,7 +111,7 @@ class classcalendarTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->getName() == 'tasUid');
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == false);
}
}
/**
* @covers calendar::getNextValidBusinessHoursRange
@@ -112,7 +119,8 @@ class classcalendarTest extends PHPUnit_Framework_TestCase
*/
public function testgetNextValidBusinessHoursRange()
{
$methods = get_class_methods($this->object);
//$methods = get_class_methods($this->object);
$methods = get_class_methods('calendar');
$this->assertTrue( in_array('getNextValidBusinessHoursRange', $methods ), 'exists method getNextValidBusinessHoursRange' );
$r = new ReflectionMethod('calendar', 'getNextValidBusinessHoursRange');
$params = $r->getParameters();
@@ -122,6 +130,6 @@ class classcalendarTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'time');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,9 @@ class classpopupMenuTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new popupMenu();
$tableId = 'login/login';
$tableFields = '';
$this->object = new popupMenu($tableId, $tableFields);
}
/**
@@ -38,12 +40,13 @@ class classpopupMenuTest 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()
{
$methods = get_class_methods('popupMenu'); $this->assertTrue( count($methods) == 14);
$methods = get_class_methods('popupMenu');
$this->assertTrue( count($methods) == 14);
}
/**
@@ -62,6 +65,6 @@ class classpopupMenuTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[1]->getName() == 'tableFields');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,10 @@ class classredirectDetailTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new redirectDetail();
$sNamespace = '';
$sRoleCode = '';
$sPathMethod = '';
$this->object = new redirectDetail($sNamespace, $sRoleCode, $sPathMethod);
}
/**
@@ -38,12 +41,13 @@ class classredirectDetailTest 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()
{
$methods = get_class_methods('redirectDetail'); $this->assertTrue( count($methods) == 1);
$methods = get_class_methods('redirectDetail');
$this->assertTrue( count($methods) == 1);
}
/**
@@ -65,6 +69,6 @@ class classredirectDetailTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->getName() == 'sPathMethod');
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,10 @@ class classtriggerDetailTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new triggerDetail();
$sNamespace = '';
$sTriggerId = '';
$sTriggerName = '';
$this->object = new triggerDetail($sNamespace, $sTriggerId, $sTriggerName);
}
/**
@@ -38,12 +41,13 @@ class classtriggerDetailTest 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()
{
$methods = get_class_methods('triggerDetail'); $this->assertTrue( count($methods) == 1);
$methods = get_class_methods('triggerDetail');
$this->assertTrue( count($methods) == 1);
}
/**
@@ -65,6 +69,6 @@ class classtriggerDetailTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->getName() == 'sTriggerName');
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,14 @@ class classuploadDocumentDataTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new uploadDocumentData();
$sApplicationUid = '';
$sUserUid = '';
$sFilename = '';
$sFileTitle = '';
$sDocumentUid = '';
$this->object = new uploadDocumentData($sApplicationUid,
$sUserUid, $sFilename, $sFileTitle, $sDocumentUid);
}
/**
@@ -38,12 +45,13 @@ class classuploadDocumentDataTest 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()
{
$methods = get_class_methods('uploadDocumentData'); $this->assertTrue( count($methods) == 1);
$methods = get_class_methods('uploadDocumentData');
$this->assertTrue( count($methods) == 1);
}
/**
@@ -75,6 +83,6 @@ class classuploadDocumentDataTest 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,7 @@ class classwsGetVariableResponseTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new wsGetVariableResponse();
$this->object = new wsGetVariableResponse('status','message','variables');
}
/**
@@ -38,12 +38,13 @@ class classwsGetVariableResponseTest 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()
{
$methods = get_class_methods('wsGetVariableResponse'); $this->assertTrue( count($methods) == 1);
$methods = get_class_methods('wsGetVariableResponse');
$this->assertTrue( count($methods) == 1);
}
/**
@@ -65,6 +66,6 @@ class classwsGetVariableResponseTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[2]->getName() == 'variables');
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == false);
}
}
}
}

View File

@@ -26,7 +26,7 @@ class classzip_fileTest extends PHPUnit_Framework_TestCase
*/
protected function setUp()
{
$this->object = new zip_file();
$this->object = new zip_file('filezip');
}
/**
@@ -38,12 +38,13 @@ class classzip_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()
{
$methods = get_class_methods('zip_file'); $this->assertTrue( count($methods) == 14);
$methods = get_class_methods('zip_file');
$this->assertTrue( count($methods) == 14);
}
/**
@@ -59,7 +60,7 @@ class classzip_fileTest extends PHPUnit_Framework_TestCase
$this->assertTrue( $params[0]->getName() == 'name');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
}
}
/**
* @covers zip_file::create_zip
@@ -71,6 +72,6 @@ class classzip_fileTest extends PHPUnit_Framework_TestCase
$this->assertTrue( in_array('create_zip', $methods ), 'exists method create_zip' );
$r = new ReflectionMethod('zip_file', 'create_zip');
$params = $r->getParameters();
}
}
}
}

View File

@@ -20,6 +20,8 @@ define('DB_NAME', $GLOBALS['DB_NAME']);
define('DB_USER', $GLOBALS['DB_USER']);
define('DB_PASS', $GLOBALS['DB_PASS']);
define('DB_HOST', $GLOBALS['DB_HOST']);
define('PATH_DB', $GLOBALS['PATH_DB']);
define('PATH_DATA', $GLOBALS['PATH_DATA']);
define('PATH_C', PATH_TRUNK . 'tmp/' );
define('PATH_SMARTY_C', PATH_TRUNK . 'tmp/' );
define('PATH_SMARTY_CACHE', PATH_TRUNK . 'tmp/' );