php units for all classes
This commit is contained in:
@@ -1,111 +1,192 @@
|
||||
<?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.propelTable.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.propelTable.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-05-10 at 20:56:12.
|
||||
*/
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 20:28:32.
|
||||
*/
|
||||
|
||||
class classpropelTableTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var propelTable
|
||||
*/
|
||||
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 propelTable();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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) == 8);
|
||||
}
|
||||
|
||||
class classpropelTableTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers propelTable::prepareQuery
|
||||
* @todo Implement testprepareQuery().
|
||||
*/
|
||||
public function testprepareQuery()
|
||||
{
|
||||
if (class_exists('propelTable')) {
|
||||
$methods = get_class_methods( 'propelTable');
|
||||
$this->assertTrue( in_array( 'prepareQuery', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testprepareQuery()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('prepareQuery', $methods ), 'exists method prepareQuery' );
|
||||
$r = new ReflectionMethod('propelTable', 'prepareQuery');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'limitPage');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers propelTable::setupFromXmlform
|
||||
* @todo Implement testsetupFromXmlform().
|
||||
*/
|
||||
public function testsetupFromXmlform()
|
||||
{
|
||||
if (class_exists('propelTable')) {
|
||||
$methods = get_class_methods( 'propelTable');
|
||||
$this->assertTrue( in_array( 'setupFromXmlform', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testsetupFromXmlform()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setupFromXmlform', $methods ), 'exists method setupFromXmlform' );
|
||||
$r = new ReflectionMethod('propelTable', 'setupFromXmlform');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'xmlForm');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers propelTable::count
|
||||
* @todo Implement testcount().
|
||||
*/
|
||||
public function testcount()
|
||||
{
|
||||
if (class_exists('propelTable')) {
|
||||
$methods = get_class_methods( 'propelTable');
|
||||
$this->assertTrue( in_array( 'count', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testcount()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('count', $methods ), 'exists method count' );
|
||||
$r = new ReflectionMethod('propelTable', 'count');
|
||||
$params = $r->getParameters();
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers propelTable::renderTitle
|
||||
* @todo Implement testrenderTitle().
|
||||
*/
|
||||
public function testrenderTitle()
|
||||
{
|
||||
if (class_exists('propelTable')) {
|
||||
$methods = get_class_methods( 'propelTable');
|
||||
$this->assertTrue( in_array( 'renderTitle', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testrenderTitle()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderTitle', $methods ), 'exists method renderTitle' );
|
||||
$r = new ReflectionMethod('propelTable', 'renderTitle');
|
||||
$params = $r->getParameters();
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers propelTable::renderField
|
||||
* @todo Implement testrenderField().
|
||||
*/
|
||||
public function testrenderField()
|
||||
{
|
||||
if (class_exists('propelTable')) {
|
||||
$methods = get_class_methods( 'propelTable');
|
||||
$this->assertTrue( in_array( 'renderField', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testrenderField()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderField', $methods ), 'exists method renderField' );
|
||||
$r = new ReflectionMethod('propelTable', 'renderField');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'row');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'r');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'result');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers propelTable::defaultStyle
|
||||
* @todo Implement testdefaultStyle().
|
||||
*/
|
||||
public function testdefaultStyle()
|
||||
{
|
||||
if (class_exists('propelTable')) {
|
||||
$methods = get_class_methods( 'propelTable');
|
||||
$this->assertTrue( in_array( 'defaultStyle', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testdefaultStyle()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('defaultStyle', $methods ), 'exists method defaultStyle' );
|
||||
$r = new ReflectionMethod('propelTable', 'defaultStyle');
|
||||
$params = $r->getParameters();
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers propelTable::renderTable
|
||||
* @todo Implement testrenderTable().
|
||||
*/
|
||||
public function testrenderTable()
|
||||
{
|
||||
if (class_exists('propelTable')) {
|
||||
$methods = get_class_methods( 'propelTable');
|
||||
$this->assertTrue( in_array( 'renderTable', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testrenderTable()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderTable', $methods ), 'exists method renderTable' );
|
||||
$r = new ReflectionMethod('propelTable', 'renderTable');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'block');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == true);
|
||||
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
||||
$this->assertTrue( $params[1]->getName() == 'fields');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers propelTable::printForm
|
||||
* @todo Implement testprintForm().
|
||||
*/
|
||||
public function testprintForm()
|
||||
{
|
||||
if (class_exists('propelTable')) {
|
||||
$methods = get_class_methods( 'propelTable');
|
||||
$this->assertTrue( in_array( 'printForm', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testprintForm()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printForm', $methods ), 'exists method printForm' );
|
||||
$r = new ReflectionMethod('propelTable', 'printForm');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'filename');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'data');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == true);
|
||||
$this->assertTrue( $params[1]->getDefaultValue() == 'Array');
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user