2012-07-12 20:40:06 -04:00
|
|
|
<?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 . 'gulliver/system/class.table.php';
|
|
|
|
|
|
|
|
|
|
/**
|
2012-07-12 22:34:02 -04:00
|
|
|
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:24.
|
2012-07-12 20:40:06 -04:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
class classTableTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* @var Table
|
|
|
|
|
*/
|
|
|
|
|
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 Table();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 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()
|
|
|
|
|
{
|
2012-07-12 22:34:02 -04:00
|
|
|
$methods = get_class_methods('Table'); $this->assertTrue( count($methods) == 23);
|
2012-07-12 20:40:06 -04:00
|
|
|
}
|
|
|
|
|
|
2012-05-10 20:51:34 -04:00
|
|
|
/**
|
|
|
|
|
* @covers Table::Table
|
|
|
|
|
* @todo Implement testTable().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testTable()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('Table', $methods ), 'exists method Table' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'Table');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'objConnection');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::SetTo
|
|
|
|
|
* @todo Implement testSetTo().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testSetTo()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('SetTo', $methods ), 'exists method SetTo' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'SetTo');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'objConnection');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::SetSource
|
|
|
|
|
* @todo Implement testSetSource().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testSetSource()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('SetSource', $methods ), 'exists method SetSource' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'SetSource');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'stQry');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'stDefaultOrder');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[1]->getDefaultValue() == 'UID');
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'stDefaultOrderDir');
|
|
|
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[2]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[2]->getDefaultValue() == 'ASC');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::GetSource
|
|
|
|
|
* @todo Implement testGetSource().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testGetSource()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('GetSource', $methods ), 'exists method GetSource' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'GetSource');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::TotalCount
|
|
|
|
|
* @todo Implement testTotalCount().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testTotalCount()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('TotalCount', $methods ), 'exists method TotalCount' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'TotalCount');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::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' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'Count');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::CurRow
|
|
|
|
|
* @todo Implement testCurRow().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testCurRow()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('CurRow', $methods ), 'exists method CurRow' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'CurRow');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::ColumnCount
|
|
|
|
|
* @todo Implement testColumnCount().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testColumnCount()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('ColumnCount', $methods ), 'exists method ColumnCount' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'ColumnCount');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::Read
|
|
|
|
|
* @todo Implement testRead().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testRead()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('Read', $methods ), 'exists method Read' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'Read');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::Seek
|
|
|
|
|
* @todo Implement testSeek().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testSeek()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('Seek', $methods ), 'exists method Seek' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'Seek');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'intPos');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[0]->getDefaultValue() == '0');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::MoveFirst
|
|
|
|
|
* @todo Implement testMoveFirst().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testMoveFirst()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('MoveFirst', $methods ), 'exists method MoveFirst' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'MoveFirst');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::EOF
|
|
|
|
|
* @todo Implement testEOF().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testEOF()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('EOF', $methods ), 'exists method EOF' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'EOF');
|
|
|
|
|
$params = $r->getParameters();
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::AddColumn
|
|
|
|
|
* @todo Implement testAddColumn().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testAddColumn()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('AddColumn', $methods ), 'exists method AddColumn' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'AddColumn');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'strLabel');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'strType');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[1]->getDefaultValue() == 'text');
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'strName');
|
|
|
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[2]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[2]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[3]->getName() == 'strAlign');
|
|
|
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[3]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[3]->getDefaultValue() == 'left');
|
|
|
|
|
$this->assertTrue( $params[4]->getName() == 'intWidth');
|
|
|
|
|
$this->assertTrue( $params[4]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[4]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[4]->getDefaultValue() == '0');
|
|
|
|
|
$this->assertTrue( $params[5]->getName() == 'strTarget');
|
|
|
|
|
$this->assertTrue( $params[5]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[5]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[5]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[6]->getName() == 'strContent');
|
|
|
|
|
$this->assertTrue( $params[6]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[6]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[6]->getDefaultValue() == '');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::AddRawColumn
|
|
|
|
|
* @todo Implement testAddRawColumn().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testAddRawColumn()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('AddRawColumn', $methods ), 'exists method AddRawColumn' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'AddRawColumn');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'strType');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[0]->getDefaultValue() == 'text');
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'strName');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'strAlign');
|
|
|
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[2]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[2]->getDefaultValue() == 'left');
|
|
|
|
|
$this->assertTrue( $params[3]->getName() == 'intWidth');
|
|
|
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[3]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[3]->getDefaultValue() == '0');
|
|
|
|
|
$this->assertTrue( $params[4]->getName() == 'strTarget');
|
|
|
|
|
$this->assertTrue( $params[4]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[4]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[5]->getName() == 'strContent');
|
|
|
|
|
$this->assertTrue( $params[5]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[5]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[5]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[6]->getName() == 'strExtra');
|
|
|
|
|
$this->assertTrue( $params[6]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[6]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[6]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[7]->getName() == 'strCondition');
|
|
|
|
|
$this->assertTrue( $params[7]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[7]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[7]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[8]->getName() == 'orderByThis');
|
|
|
|
|
$this->assertTrue( $params[8]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[8]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[8]->getDefaultValue() == '1');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::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' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'RenderTitle');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'pa');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'intPos');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[1]->getDefaultValue() == '1');
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'strClass');
|
|
|
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[2]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[2]->getDefaultValue() == 'tblHeader');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::RenderTitle_ajax
|
|
|
|
|
* @todo Implement testRenderTitle_ajax().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testRenderTitle_ajax()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('RenderTitle_ajax', $methods ), 'exists method RenderTitle_ajax' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'RenderTitle_ajax');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'pa');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'intPos');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[1]->getDefaultValue() == '1');
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'strClass');
|
|
|
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[2]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[2]->getDefaultValue() == 'tblHeader');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::RenderTitle2
|
|
|
|
|
* @todo Implement testRenderTitle2().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testRenderTitle2()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('RenderTitle2', $methods ), 'exists method RenderTitle2' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'RenderTitle2');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'pa');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'fil');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'intPos');
|
|
|
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[2]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[3]->getName() == 'strClass');
|
|
|
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[3]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[3]->getDefaultValue() == 'tblHeader');
|
|
|
|
|
$this->assertTrue( $params[4]->getName() == 'auxgetval');
|
|
|
|
|
$this->assertTrue( $params[4]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[4]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[4]->getDefaultValue() == '');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::RenderColumn
|
|
|
|
|
* @todo Implement testRenderColumn().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testRenderColumn()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('RenderColumn', $methods ), 'exists method RenderColumn' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'RenderColumn');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'intPos');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[0]->getDefaultValue() == '0');
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'strClass');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[1]->getDefaultValue() == 'tblCell');
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'strClassLink');
|
|
|
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[2]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[2]->getDefaultValue() == 'tblCellA');
|
|
|
|
|
$this->assertTrue( $params[3]->getName() == 'number');
|
|
|
|
|
$this->assertTrue( $params[3]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[3]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[3]->getDefaultValue() == '0');
|
|
|
|
|
$this->assertTrue( $params[4]->getName() == 'renderTD');
|
|
|
|
|
$this->assertTrue( $params[4]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[4]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[4]->getDefaultValue() == '1');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::SetAction
|
|
|
|
|
* @todo Implement testSetAction().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testSetAction()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('SetAction', $methods ), 'exists method SetAction' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'SetAction');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'strAction');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'strLabel');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[1]->getDefaultValue() == 'Continue');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::setTranslate
|
|
|
|
|
* @todo Implement testsetTranslate().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testsetTranslate()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('setTranslate', $methods ), 'exists method setTranslate' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'setTranslate');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'contexto');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'tabla');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'nombre');
|
|
|
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[2]->isOptional () == false);
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::translateValue
|
|
|
|
|
* @todo Implement testtranslateValue().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testtranslateValue()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('translateValue', $methods ), 'exists method translateValue' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'translateValue');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'contexto');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'valor');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'lang');
|
|
|
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[2]->isOptional () == false);
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::setContext
|
|
|
|
|
* @todo Implement testsetContext().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testsetContext()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('setContext', $methods ), 'exists method setContext' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'setContext');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'contexto');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers Table::ParsingFromHtml
|
|
|
|
|
* @todo Implement testParsingFromHtml().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testParsingFromHtml()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('ParsingFromHtml', $methods ), 'exists method ParsingFromHtml' );
|
|
|
|
|
$r = new ReflectionMethod('Table', 'ParsingFromHtml');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'value');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'number');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[1]->getDefaultValue() == '100000000');
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|