Files
luos/tests/automated/workflow/engine/classes/classserverConfTest.php

386 lines
14 KiB
PHP
Raw Normal View History

2012-07-12 20:40:06 -04:00
<?php
2012-07-12 20:40:06 -04:00
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 . 'workflow/engine/classes/class.serverConfiguration.php';
/**
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
*/
2012-07-12 20:40:06 -04:00
class classserverConfTest extends PHPUnit_Framework_TestCase
{
2012-07-12 20:40:06 -04:00
/**
* @var serverConf
*/
2012-07-12 20:40:06 -04:00
protected $object;
/**
* Sets up the fixture, for example, opens a network connection.
* This method is called before a test is executed.
*/
2012-07-12 20:40:06 -04:00
protected function setUp()
{
$this->object = new serverConf();
}
/**
* Tears down the fixture, for example, closes a network connection.
* This method is called after a test is executed.
*/
2012-07-12 20:40:06 -04:00
protected function tearDown()
{
2012-07-12 20:40:06 -04:00
}
/**
* This is the default method to test, if the class still having
2012-07-12 20:40:06 -04:00
* the same number of methods.
*/
2012-07-12 20:40:06 -04:00
public function testNumberOfMethodsInThisClass()
{
$methods = get_class_methods('serverConf');
$this->assertTrue(count($methods) == 23);
2012-07-12 20:40:06 -04:00
}
/**
* @covers serverConf::__construct
* @todo Implement test__construct().
*/
2012-07-12 20:40:06 -04:00
public function test__construct()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('__construct', $methods), 'exists method __construct');
2012-07-12 20:40:06 -04:00
$r = new ReflectionMethod('serverConf', '__construct');
$params = $r->getParameters();
}
/**
* @covers serverConf::getSingleton
* @todo Implement testgetSingleton().
*/
2012-07-12 20:40:06 -04:00
public function testgetSingleton()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('getSingleton', $methods), 'exists method getSingleton');
2012-07-12 20:40:06 -04:00
$r = new ReflectionMethod('serverConf', 'getSingleton');
$params = $r->getParameters();
}
/**
* @covers serverConf::serializeInstance
* @todo Implement testserializeInstance().
*/
2012-07-12 20:40:06 -04:00
public function testserializeInstance()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('serializeInstance', $methods), 'exists method serializeInstance');
2012-07-12 20:40:06 -04:00
$r = new ReflectionMethod('serverConf', 'serializeInstance');
$params = $r->getParameters();
}
/**
* @covers serverConf::unSerializeInstance
* @todo Implement testunSerializeInstance().
*/
2012-07-12 20:40:06 -04:00
public function testunSerializeInstance()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('unSerializeInstance', $methods), 'exists method unSerializeInstance');
2012-07-12 20:40:06 -04:00
$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);
}
/**
* @covers serverConf::saveSingleton
* @todo Implement testsaveSingleton().
*/
2012-07-12 20:40:06 -04:00
public function testsaveSingleton()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('saveSingleton', $methods), 'exists method saveSingleton');
2012-07-12 20:40:06 -04:00
$r = new ReflectionMethod('serverConf', 'saveSingleton');
$params = $r->getParameters();
}
/**
* @covers serverConf::setProperty
* @todo Implement testsetProperty().
*/
2012-07-12 20:40:06 -04:00
public function testsetProperty()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('setProperty', $methods), 'exists method setProperty');
2012-07-12 20:40:06 -04:00
$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);
}
/**
* @covers serverConf::unsetProperty
* @todo Implement testunsetProperty().
*/
2012-07-12 20:40:06 -04:00
public function testunsetProperty()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('unsetProperty', $methods), 'exists method unsetProperty');
2012-07-12 20:40:06 -04:00
$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);
}
/**
* @covers serverConf::getProperty
* @todo Implement testgetProperty().
*/
2012-07-12 20:40:06 -04:00
public function testgetProperty()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('getProperty', $methods), 'exists method getProperty');
2012-07-12 20:40:06 -04:00
$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);
}
/**
* @covers serverConf::sucessfulLogin
* @todo Implement testsucessfulLogin().
*/
2012-07-12 20:40:06 -04:00
public function testsucessfulLogin()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('sucessfulLogin', $methods), 'exists method sucessfulLogin');
2012-07-12 20:40:06 -04:00
$r = new ReflectionMethod('serverConf', 'sucessfulLogin');
$params = $r->getParameters();
}
/**
* @covers serverConf::setWsInfo
* @todo Implement testsetWsInfo().
*/
2012-07-12 20:40:06 -04:00
public function testsetWsInfo()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('setWsInfo', $methods), 'exists method setWsInfo');
2012-07-12 20:40:06 -04:00
$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);
}
/**
* @covers serverConf::changeStatusWS
* @todo Implement testchangeStatusWS().
*/
2012-07-12 20:40:06 -04:00
public function testchangeStatusWS()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('changeStatusWS', $methods), 'exists method changeStatusWS');
2012-07-12 20:40:06 -04:00
$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);
}
/**
* @covers serverConf::isWSDisabled
* @todo Implement testisWSDisabled().
*/
2012-07-12 20:40:06 -04:00
public function testisWSDisabled()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('isWSDisabled', $methods), 'exists method isWSDisabled');
2012-07-12 20:40:06 -04:00
$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);
}
/**
* @covers serverConf::checkIfHostNameHasChanged
* @todo Implement testcheckIfHostNameHasChanged().
*/
2012-07-12 20:40:06 -04:00
public function testcheckIfHostNameHasChanged()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('checkIfHostNameHasChanged', $methods), 'exists method checkIfHostNameHasChanged');
2012-07-12 20:40:06 -04:00
$r = new ReflectionMethod('serverConf', 'checkIfHostNameHasChanged');
$params = $r->getParameters();
}
/**
* @covers serverConf::getWSList
* @todo Implement testgetWSList().
*/
2012-07-12 20:40:06 -04:00
public function testgetWSList()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('getWSList', $methods), 'exists method getWSList');
2012-07-12 20:40:06 -04:00
$r = new ReflectionMethod('serverConf', 'getWSList');
$params = $r->getParameters();
}
/**
* @covers serverConf::getWorkspaceInfo
* @todo Implement testgetWorkspaceInfo().
*/
2012-07-12 20:40:06 -04:00
public function testgetWorkspaceInfo()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('getWorkspaceInfo', $methods), 'exists method getWorkspaceInfo');
2012-07-12 20:40:06 -04:00
$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);
}
/**
* @covers serverConf::getPluginsList
* @todo Implement testgetPluginsList().
*/
2012-07-12 20:40:06 -04:00
public function testgetPluginsList()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('getPluginsList', $methods), 'exists method getPluginsList');
2012-07-12 20:40:06 -04:00
$r = new ReflectionMethod('serverConf', 'getPluginsList');
$params = $r->getParameters();
}
/**
* @covers serverConf::addPlugin
* @todo Implement testaddPlugin().
*/
2012-07-12 20:40:06 -04:00
public function testaddPlugin()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('addPlugin', $methods), 'exists method addPlugin');
2012-07-12 20:40:06 -04:00
$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);
}
/**
* @covers serverConf::getDBVersion
* @todo Implement testgetDBVersion().
*/
2012-07-12 20:40:06 -04:00
public function testgetDBVersion()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('getDBVersion', $methods), 'exists method getDBVersion');
2012-07-12 20:40:06 -04:00
$r = new ReflectionMethod('serverConf', 'getDBVersion');
$params = $r->getParameters();
}
/**
* @covers serverConf::resetLogins
* @todo Implement testresetLogins().
*/
2012-07-12 20:40:06 -04:00
public function testresetLogins()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('resetLogins', $methods), 'exists method resetLogins');
2012-07-12 20:40:06 -04:00
$r = new ReflectionMethod('serverConf', 'resetLogins');
$params = $r->getParameters();
}
/**
* @covers serverConf::getLanDirection
* @todo Implement testgetLanDirection().
*/
2012-07-12 20:40:06 -04:00
public function testgetLanDirection()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('getLanDirection', $methods), 'exists method getLanDirection');
2012-07-12 20:40:06 -04:00
$r = new ReflectionMethod('serverConf', 'getLanDirection');
$params = $r->getParameters();
}
/**
* @covers serverConf::setHeartbeatProperty
* @todo Implement testsetHeartbeatProperty().
*/
2012-07-12 20:40:06 -04:00
public function testsetHeartbeatProperty()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('setHeartbeatProperty', $methods), 'exists method setHeartbeatProperty');
2012-07-12 20:40:06 -04:00
$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);
}
/**
* @covers serverConf::unsetHeartbeatProperty
* @todo Implement testunsetHeartbeatProperty().
*/
2012-07-12 20:40:06 -04:00
public function testunsetHeartbeatProperty()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('unsetHeartbeatProperty', $methods), 'exists method unsetHeartbeatProperty');
2012-07-12 20:40:06 -04:00
$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);
}
/**
* @covers serverConf::getHeartbeatProperty
* @todo Implement testgetHeartbeatProperty().
*/
2012-07-12 20:40:06 -04:00
public function testgetHeartbeatProperty()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('getHeartbeatProperty', $methods), 'exists method getHeartbeatProperty');
2012-07-12 20:40:06 -04:00
$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);
}
}