php units for all classes
This commit is contained in:
@@ -1,147 +1,245 @@
|
||||
<?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/thirdparty/propel/Propel.php' ;
|
||||
require_once PATH_TRUNK . 'gulliver/thirdparty/creole/Creole.php' ;
|
||||
require_once PATH_TRUNK . 'workflow/engine/classes/class.xmlDb.php';
|
||||
<?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 . 'workflow/engine/classes/class.xmlDb.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-05-10 at 20:56:18.
|
||||
*/
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 20:28:40.
|
||||
*/
|
||||
|
||||
class classXMLConnectionTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var XMLConnection
|
||||
*/
|
||||
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 XMLConnection();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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()
|
||||
{
|
||||
$this->assertTrue( count($methods) == 11);
|
||||
}
|
||||
|
||||
class classXMLConnectionTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers XMLConnection::XMLConnection
|
||||
* @todo Implement testXMLConnection().
|
||||
*/
|
||||
public function testXMLConnection()
|
||||
{
|
||||
if (class_exists('XMLConnection')) {
|
||||
$methods = get_class_methods( 'XMLConnection');
|
||||
$this->assertTrue( in_array( 'XMLConnection', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testXMLConnection()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('XMLConnection', $methods ), 'exists method XMLConnection' );
|
||||
$r = new ReflectionMethod('XMLConnection', 'XMLConnection');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'file');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XMLConnection::query
|
||||
* @todo Implement testquery().
|
||||
*/
|
||||
public function testquery()
|
||||
{
|
||||
if (class_exists('XMLConnection')) {
|
||||
$methods = get_class_methods( 'XMLConnection');
|
||||
$this->assertTrue( in_array( 'query', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testquery()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('query', $methods ), 'exists method query' );
|
||||
$r = new ReflectionMethod('XMLConnection', 'query');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'sql');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XMLConnection::sqlLike
|
||||
* @todo Implement testsqlLike().
|
||||
*/
|
||||
public function testsqlLike()
|
||||
{
|
||||
if (class_exists('XMLConnection')) {
|
||||
$methods = get_class_methods( 'XMLConnection');
|
||||
$this->assertTrue( in_array( 'sqlLike', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testsqlLike()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('sqlLike', $methods ), 'exists method sqlLike' );
|
||||
$r = new ReflectionMethod('XMLConnection', 'sqlLike');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'a');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'b');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XMLConnection::expandFields
|
||||
* @todo Implement testexpandFields().
|
||||
*/
|
||||
public function testexpandFields()
|
||||
{
|
||||
if (class_exists('XMLConnection')) {
|
||||
$methods = get_class_methods( 'XMLConnection');
|
||||
$this->assertTrue( in_array( 'expandFields', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testexpandFields()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('expandFields', $methods ), 'exists method expandFields' );
|
||||
$r = new ReflectionMethod('XMLConnection', 'expandFields');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'resRow');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'fieldsList');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XMLConnection::fetchNode
|
||||
* @todo Implement testfetchNode().
|
||||
*/
|
||||
public function testfetchNode()
|
||||
{
|
||||
if (class_exists('XMLConnection')) {
|
||||
$methods = get_class_methods( 'XMLConnection');
|
||||
$this->assertTrue( in_array( 'fetchNode', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testfetchNode()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('fetchNode', $methods ), 'exists method fetchNode' );
|
||||
$r = new ReflectionMethod('XMLConnection', 'fetchNode');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'node');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XMLConnection::fetchChildren
|
||||
* @todo Implement testfetchChildren().
|
||||
*/
|
||||
public function testfetchChildren()
|
||||
{
|
||||
if (class_exists('XMLConnection')) {
|
||||
$methods = get_class_methods( 'XMLConnection');
|
||||
$this->assertTrue( in_array( 'fetchChildren', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testfetchChildren()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('fetchChildren', $methods ), 'exists method fetchChildren' );
|
||||
$r = new ReflectionMethod('XMLConnection', 'fetchChildren');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'node');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XMLConnection::disconnect
|
||||
* @todo Implement testdisconnect().
|
||||
*/
|
||||
public function testdisconnect()
|
||||
{
|
||||
if (class_exists('XMLConnection')) {
|
||||
$methods = get_class_methods( 'XMLConnection');
|
||||
$this->assertTrue( in_array( 'disconnect', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testdisconnect()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('disconnect', $methods ), 'exists method disconnect' );
|
||||
$r = new ReflectionMethod('XMLConnection', 'disconnect');
|
||||
$params = $r->getParameters();
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XMLConnection::sqlWhereLike
|
||||
* @todo Implement testsqlWhereLike().
|
||||
*/
|
||||
public function testsqlWhereLike()
|
||||
{
|
||||
if (class_exists('XMLConnection')) {
|
||||
$methods = get_class_methods( 'XMLConnection');
|
||||
$this->assertTrue( in_array( 'sqlWhereLike', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testsqlWhereLike()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('sqlWhereLike', $methods ), 'exists method sqlWhereLike' );
|
||||
$r = new ReflectionMethod('XMLConnection', 'sqlWhereLike');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'match');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XMLConnection::sqlString
|
||||
* @todo Implement testsqlString().
|
||||
*/
|
||||
public function testsqlString()
|
||||
{
|
||||
if (class_exists('XMLConnection')) {
|
||||
$methods = get_class_methods( 'XMLConnection');
|
||||
$this->assertTrue( in_array( 'sqlString', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testsqlString()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('sqlString', $methods ), 'exists method sqlString' );
|
||||
$r = new ReflectionMethod('XMLConnection', 'sqlString');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'match');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XMLConnection::insertRow
|
||||
* @todo Implement testinsertRow().
|
||||
*/
|
||||
public function testinsertRow()
|
||||
{
|
||||
if (class_exists('XMLConnection')) {
|
||||
$methods = get_class_methods( 'XMLConnection');
|
||||
$this->assertTrue( in_array( 'insertRow', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testinsertRow()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('insertRow', $methods ), 'exists method insertRow' );
|
||||
$r = new ReflectionMethod('XMLConnection', 'insertRow');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'node');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'values');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers XMLConnection::updateRow
|
||||
* @todo Implement testupdateRow().
|
||||
*/
|
||||
public function testupdateRow()
|
||||
{
|
||||
if (class_exists('XMLConnection')) {
|
||||
$methods = get_class_methods( 'XMLConnection');
|
||||
$this->assertTrue( in_array( 'updateRow', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testupdateRow()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('updateRow', $methods ), 'exists method updateRow' );
|
||||
$r = new ReflectionMethod('XMLConnection', 'updateRow');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'node');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'values');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user