Merge pull request #271 from hector-cortez/master
BUG 0000 Adjustment in te class classserverConfTest
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?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';
|
||||
@@ -11,10 +12,10 @@ require_once PATH_TRUNK . 'workflow/engine/classes/class.serverConfiguration.php
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
|
||||
*/
|
||||
|
||||
*/
|
||||
class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
|
||||
/**
|
||||
* @var serverConf
|
||||
*/
|
||||
@@ -35,6 +36,7 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
protected function tearDown()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -43,7 +45,8 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
*/
|
||||
public function testNumberOfMethodsInThisClass()
|
||||
{
|
||||
$methods = get_class_methods('serverConf'); $this->assertTrue( count($methods) == 23);
|
||||
$methods = get_class_methods('serverConf');
|
||||
$this->assertTrue(count($methods) == 23);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -53,7 +56,7 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function test__construct()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' );
|
||||
$this->assertTrue(in_array('__construct', $methods), 'exists method __construct');
|
||||
$r = new ReflectionMethod('serverConf', '__construct');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
@@ -65,7 +68,7 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testgetSingleton()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getSingleton', $methods ), 'exists method getSingleton' );
|
||||
$this->assertTrue(in_array('getSingleton', $methods), 'exists method getSingleton');
|
||||
$r = new ReflectionMethod('serverConf', 'getSingleton');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
@@ -77,7 +80,7 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testserializeInstance()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('serializeInstance', $methods ), 'exists method serializeInstance' );
|
||||
$this->assertTrue(in_array('serializeInstance', $methods), 'exists method serializeInstance');
|
||||
$r = new ReflectionMethod('serverConf', 'serializeInstance');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
@@ -89,12 +92,12 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testunSerializeInstance()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('unSerializeInstance', $methods ), 'exists method unSerializeInstance' );
|
||||
$this->assertTrue(in_array('unSerializeInstance', $methods), 'exists method unSerializeInstance');
|
||||
$r = new ReflectionMethod('serverConf', 'unSerializeInstance');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'serialized');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'serialized');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -104,7 +107,7 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testsaveSingleton()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('saveSingleton', $methods ), 'exists method saveSingleton' );
|
||||
$this->assertTrue(in_array('saveSingleton', $methods), 'exists method saveSingleton');
|
||||
$r = new ReflectionMethod('serverConf', 'saveSingleton');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
@@ -116,15 +119,15 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testsetProperty()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setProperty', $methods ), 'exists method setProperty' );
|
||||
$this->assertTrue(in_array('setProperty', $methods), 'exists method setProperty');
|
||||
$r = new ReflectionMethod('serverConf', 'setProperty');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'propertyName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'propertyValue');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'propertyName');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'propertyValue');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -134,12 +137,12 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testunsetProperty()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('unsetProperty', $methods ), 'exists method unsetProperty' );
|
||||
$this->assertTrue(in_array('unsetProperty', $methods), 'exists method unsetProperty');
|
||||
$r = new ReflectionMethod('serverConf', 'unsetProperty');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'propertyName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'propertyName');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -149,12 +152,12 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testgetProperty()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getProperty', $methods ), 'exists method getProperty' );
|
||||
$this->assertTrue(in_array('getProperty', $methods), 'exists method getProperty');
|
||||
$r = new ReflectionMethod('serverConf', 'getProperty');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'propertyName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'propertyName');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -164,7 +167,7 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testsucessfulLogin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('sucessfulLogin', $methods ), 'exists method sucessfulLogin' );
|
||||
$this->assertTrue(in_array('sucessfulLogin', $methods), 'exists method sucessfulLogin');
|
||||
$r = new ReflectionMethod('serverConf', 'sucessfulLogin');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
@@ -176,15 +179,15 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testsetWsInfo()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setWsInfo', $methods ), 'exists method setWsInfo' );
|
||||
$this->assertTrue(in_array('setWsInfo', $methods), 'exists method setWsInfo');
|
||||
$r = new ReflectionMethod('serverConf', 'setWsInfo');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'wsname');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'info');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'wsname');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'info');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -194,12 +197,12 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testchangeStatusWS()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('changeStatusWS', $methods ), 'exists method changeStatusWS' );
|
||||
$this->assertTrue(in_array('changeStatusWS', $methods), 'exists method changeStatusWS');
|
||||
$r = new ReflectionMethod('serverConf', 'changeStatusWS');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'wsName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'wsName');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -209,12 +212,12 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testisWSDisabled()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('isWSDisabled', $methods ), 'exists method isWSDisabled' );
|
||||
$this->assertTrue(in_array('isWSDisabled', $methods), 'exists method isWSDisabled');
|
||||
$r = new ReflectionMethod('serverConf', 'isWSDisabled');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'wsName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'wsName');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -224,7 +227,7 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testcheckIfHostNameHasChanged()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('checkIfHostNameHasChanged', $methods ), 'exists method checkIfHostNameHasChanged' );
|
||||
$this->assertTrue(in_array('checkIfHostNameHasChanged', $methods), 'exists method checkIfHostNameHasChanged');
|
||||
$r = new ReflectionMethod('serverConf', 'checkIfHostNameHasChanged');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
@@ -236,7 +239,7 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testgetWSList()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getWSList', $methods ), 'exists method getWSList' );
|
||||
$this->assertTrue(in_array('getWSList', $methods), 'exists method getWSList');
|
||||
$r = new ReflectionMethod('serverConf', 'getWSList');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
@@ -248,12 +251,12 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testgetWorkspaceInfo()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getWorkspaceInfo', $methods ), 'exists method getWorkspaceInfo' );
|
||||
$this->assertTrue(in_array('getWorkspaceInfo', $methods), 'exists method getWorkspaceInfo');
|
||||
$r = new ReflectionMethod('serverConf', 'getWorkspaceInfo');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'wsName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'wsName');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -263,7 +266,7 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testgetPluginsList()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getPluginsList', $methods ), 'exists method getPluginsList' );
|
||||
$this->assertTrue(in_array('getPluginsList', $methods), 'exists method getPluginsList');
|
||||
$r = new ReflectionMethod('serverConf', 'getPluginsList');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
@@ -275,15 +278,15 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testaddPlugin()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('addPlugin', $methods ), 'exists method addPlugin' );
|
||||
$this->assertTrue(in_array('addPlugin', $methods), 'exists method addPlugin');
|
||||
$r = new ReflectionMethod('serverConf', 'addPlugin');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'info');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'workspace');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'info');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -293,7 +296,7 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testgetDBVersion()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getDBVersion', $methods ), 'exists method getDBVersion' );
|
||||
$this->assertTrue(in_array('getDBVersion', $methods), 'exists method getDBVersion');
|
||||
$r = new ReflectionMethod('serverConf', 'getDBVersion');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
@@ -305,7 +308,7 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testresetLogins()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('resetLogins', $methods ), 'exists method resetLogins' );
|
||||
$this->assertTrue(in_array('resetLogins', $methods), 'exists method resetLogins');
|
||||
$r = new ReflectionMethod('serverConf', 'resetLogins');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
@@ -317,7 +320,7 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testgetLanDirection()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getLanDirection', $methods ), 'exists method getLanDirection' );
|
||||
$this->assertTrue(in_array('getLanDirection', $methods), 'exists method getLanDirection');
|
||||
$r = new ReflectionMethod('serverConf', 'getLanDirection');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
@@ -329,18 +332,18 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testsetHeartbeatProperty()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setHeartbeatProperty', $methods ), 'exists method setHeartbeatProperty' );
|
||||
$this->assertTrue(in_array('setHeartbeatProperty', $methods), 'exists method setHeartbeatProperty');
|
||||
$r = new ReflectionMethod('serverConf', 'setHeartbeatProperty');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'propertyName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'propertyValue');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'propertyName');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'propertyValue');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
$this->assertTrue($params[2]->getName() == 'workspace');
|
||||
$this->assertTrue($params[2]->isArray() == false);
|
||||
$this->assertTrue($params[2]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -350,15 +353,15 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testunsetHeartbeatProperty()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('unsetHeartbeatProperty', $methods ), 'exists method unsetHeartbeatProperty' );
|
||||
$this->assertTrue(in_array('unsetHeartbeatProperty', $methods), 'exists method unsetHeartbeatProperty');
|
||||
$r = new ReflectionMethod('serverConf', 'unsetHeartbeatProperty');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'propertyName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'propertyName');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'workspace');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -368,15 +371,15 @@ class classserverConfTest extends PHPUnit_Framework_TestCase
|
||||
public function testgetHeartbeatProperty()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getHeartbeatProperty', $methods ), 'exists method getHeartbeatProperty' );
|
||||
$this->assertTrue(in_array('getHeartbeatProperty', $methods), 'exists method getHeartbeatProperty');
|
||||
$r = new ReflectionMethod('serverConf', 'getHeartbeatProperty');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'propertyName');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue($params[0]->getName() == 'propertyName');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
$this->assertTrue($params[1]->getName() == 'workspace');
|
||||
$this->assertTrue($params[1]->isArray() == false);
|
||||
$this->assertTrue($params[1]->isOptional() == false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user