Merge pull request #269 from hector-cortez/master
BUG 0000 Adjustment in te class classpropelTableTest
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,19 +12,19 @@ require_once PATH_TRUNK . 'workflow/engine/classes/class.propelTable.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:25.
|
||||
*/
|
||||
|
||||
*/
|
||||
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();
|
||||
@@ -32,145 +33,147 @@ class classpropelTableTest extends PHPUnit_Framework_TestCase
|
||||
/**
|
||||
* 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
|
||||
* This is the default method to test, if the class still having
|
||||
* the same number of methods.
|
||||
*/
|
||||
*/
|
||||
public function testNumberOfMethodsInThisClass()
|
||||
{
|
||||
$methods = get_class_methods('propelTable'); $this->assertTrue( count($methods) == 8);
|
||||
$methods = get_class_methods('propelTable');
|
||||
$this->assertTrue(count($methods) == 8);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers propelTable::prepareQuery
|
||||
* @todo Implement testprepareQuery().
|
||||
*/
|
||||
* @covers propelTable::prepareQuery
|
||||
* @todo Implement testprepareQuery().
|
||||
*/
|
||||
public function testprepareQuery()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('prepareQuery', $methods ), 'exists method prepareQuery' );
|
||||
$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->assertTrue($params[0]->getName() == 'limitPage');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == true);
|
||||
$this->assertTrue($params[0]->getDefaultValue() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers propelTable::setupFromXmlform
|
||||
* @todo Implement testsetupFromXmlform().
|
||||
*/
|
||||
* @covers propelTable::setupFromXmlform
|
||||
* @todo Implement testsetupFromXmlform().
|
||||
*/
|
||||
public function testsetupFromXmlform()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('setupFromXmlform', $methods ), 'exists method setupFromXmlform' );
|
||||
$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->assertTrue($params[0]->getName() == 'xmlForm');
|
||||
$this->assertTrue($params[0]->isArray() == false);
|
||||
$this->assertTrue($params[0]->isOptional() == false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers propelTable::count
|
||||
* @todo Implement testcount().
|
||||
*/
|
||||
* @covers propelTable::count
|
||||
* @todo Implement testcount().
|
||||
*/
|
||||
public function testcount()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('count', $methods ), 'exists method count' );
|
||||
$this->assertTrue(in_array('count', $methods), 'exists method count');
|
||||
$r = new ReflectionMethod('propelTable', 'count');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers propelTable::renderTitle
|
||||
* @todo Implement testrenderTitle().
|
||||
*/
|
||||
* @covers propelTable::renderTitle
|
||||
* @todo Implement testrenderTitle().
|
||||
*/
|
||||
public function testrenderTitle()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderTitle', $methods ), 'exists method renderTitle' );
|
||||
$this->assertTrue(in_array('renderTitle', $methods), 'exists method renderTitle');
|
||||
$r = new ReflectionMethod('propelTable', 'renderTitle');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers propelTable::renderField
|
||||
* @todo Implement testrenderField().
|
||||
*/
|
||||
* @covers propelTable::renderField
|
||||
* @todo Implement testrenderField().
|
||||
*/
|
||||
public function testrenderField()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderField', $methods ), 'exists method renderField' );
|
||||
$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->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);
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers propelTable::defaultStyle
|
||||
* @todo Implement testdefaultStyle().
|
||||
*/
|
||||
* @covers propelTable::defaultStyle
|
||||
* @todo Implement testdefaultStyle().
|
||||
*/
|
||||
public function testdefaultStyle()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('defaultStyle', $methods ), 'exists method defaultStyle' );
|
||||
$this->assertTrue(in_array('defaultStyle', $methods), 'exists method defaultStyle');
|
||||
$r = new ReflectionMethod('propelTable', 'defaultStyle');
|
||||
$params = $r->getParameters();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers propelTable::renderTable
|
||||
* @todo Implement testrenderTable().
|
||||
*/
|
||||
* @covers propelTable::renderTable
|
||||
* @todo Implement testrenderTable().
|
||||
*/
|
||||
public function testrenderTable()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('renderTable', $methods ), 'exists method renderTable' );
|
||||
$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->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() == '');
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers propelTable::printForm
|
||||
* @todo Implement testprintForm().
|
||||
*/
|
||||
* @covers propelTable::printForm
|
||||
* @todo Implement testprintForm().
|
||||
*/
|
||||
public function testprintForm()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printForm', $methods ), 'exists method printForm' );
|
||||
$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->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());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user