Files
luos/old_tests/automated/workflow/engine/classes/classpropelTableTest.php

180 lines
6.5 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.propelTable.php';
/**
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:25.
*/
2012-07-12 20:40:06 -04:00
class classpropelTableTest extends PHPUnit_Framework_TestCase
{
2012-07-12 20:40:06 -04:00
/**
* @var propelTable
*/
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 propelTable();
}
/**
* 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('propelTable');
$this->assertTrue(count($methods) == 8);
2012-07-12 20:40:06 -04:00
}
/**
* @covers propelTable::prepareQuery
* @todo Implement testprepareQuery().
*/
2012-07-12 20:40:06 -04:00
public function testprepareQuery()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('prepareQuery', $methods), 'exists method prepareQuery');
2012-07-12 20:40:06 -04:00
$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() == '');
}
/**
* @covers propelTable::setupFromXmlform
* @todo Implement testsetupFromXmlform().
*/
2012-07-12 20:40:06 -04:00
public function testsetupFromXmlform()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('setupFromXmlform', $methods), 'exists method setupFromXmlform');
2012-07-12 20:40:06 -04:00
$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);
}
/**
* @covers propelTable::count
* @todo Implement testcount().
*/
2012-07-12 20:40:06 -04:00
public function testcount()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('count', $methods), 'exists method count');
2012-07-12 20:40:06 -04:00
$r = new ReflectionMethod('propelTable', 'count');
$params = $r->getParameters();
}
/**
* @covers propelTable::renderTitle
* @todo Implement testrenderTitle().
*/
2012-07-12 20:40:06 -04:00
public function testrenderTitle()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('renderTitle', $methods), 'exists method renderTitle');
2012-07-12 20:40:06 -04:00
$r = new ReflectionMethod('propelTable', 'renderTitle');
$params = $r->getParameters();
}
/**
* @covers propelTable::renderField
* @todo Implement testrenderField().
*/
2012-07-12 20:40:06 -04:00
public function testrenderField()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('renderField', $methods), 'exists method renderField');
2012-07-12 20:40:06 -04:00
$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);
}
/**
* @covers propelTable::defaultStyle
* @todo Implement testdefaultStyle().
*/
2012-07-12 20:40:06 -04:00
public function testdefaultStyle()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('defaultStyle', $methods), 'exists method defaultStyle');
2012-07-12 20:40:06 -04:00
$r = new ReflectionMethod('propelTable', 'defaultStyle');
$params = $r->getParameters();
}
/**
* @covers propelTable::renderTable
* @todo Implement testrenderTable().
*/
2012-07-12 20:40:06 -04:00
public function testrenderTable()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('renderTable', $methods), 'exists method renderTable');
2012-07-12 20:40:06 -04:00
$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() == '');
}
/**
* @covers propelTable::printForm
* @todo Implement testprintForm().
*/
2012-07-12 20:40:06 -04:00
public function testprintForm()
{
$methods = get_class_methods($this->object);
$this->assertTrue(in_array('printForm', $methods), 'exists method printForm');
2012-07-12 20:40:06 -04:00
$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());
}
}