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 . 'workflow/engine/classes/class.pmDashlet.php';
|
2012-05-10 20:57:25 -04:00
|
|
|
|
2012-07-12 20:40:06 -04:00
|
|
|
/**
|
|
|
|
|
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 20:28:39.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
class classPMDashletTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* @var PMDashlet
|
|
|
|
|
*/
|
|
|
|
|
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 PMDashlet();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 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) == 58);
|
|
|
|
|
}
|
2012-05-10 20:57:25 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers PMDashlet::getAdditionalFields
|
|
|
|
|
* @todo Implement testgetAdditionalFields().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testgetAdditionalFields()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('getAdditionalFields', $methods ), 'exists method getAdditionalFields' );
|
|
|
|
|
$r = new ReflectionMethod('PMDashlet', 'getAdditionalFields');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'className');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
|
|
|
|
|
2012-05-10 20:57:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers PMDashlet::setup
|
|
|
|
|
* @todo Implement testsetup().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testsetup()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('setup', $methods ), 'exists method setup' );
|
|
|
|
|
$r = new ReflectionMethod('PMDashlet', 'setup');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'dasInsUid');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
|
|
|
|
|
2012-05-10 20:57:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers PMDashlet::render
|
|
|
|
|
* @todo Implement testrender().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testrender()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('render', $methods ), 'exists method render' );
|
|
|
|
|
$r = new ReflectionMethod('PMDashlet', 'render');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'width');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[0]->getDefaultValue() == '300');
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
|
|
|
|
|
2012-05-10 20:57:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers PMDashlet::getDashletInstance
|
|
|
|
|
* @todo Implement testgetDashletInstance().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testgetDashletInstance()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('getDashletInstance', $methods ), 'exists method getDashletInstance' );
|
|
|
|
|
$r = new ReflectionMethod('PMDashlet', 'getDashletInstance');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
|
|
|
|
|
2012-05-10 20:57:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers PMDashlet::getDashletObject
|
|
|
|
|
* @todo Implement testgetDashletObject().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testgetDashletObject()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('getDashletObject', $methods ), 'exists method getDashletObject' );
|
|
|
|
|
$r = new ReflectionMethod('PMDashlet', 'getDashletObject');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
|
|
|
|
|
2012-05-10 20:57:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers PMDashlet::getDashletsInstances
|
|
|
|
|
* @todo Implement testgetDashletsInstances().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testgetDashletsInstances()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('getDashletsInstances', $methods ), 'exists method getDashletsInstances' );
|
|
|
|
|
$r = new ReflectionMethod('PMDashlet', 'getDashletsInstances');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'start');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'limit');
|
|
|
|
|
$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.');
|
|
|
|
|
|
2012-05-10 20:57:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers PMDashlet::getDashletsInstancesQuantity
|
|
|
|
|
* @todo Implement testgetDashletsInstancesQuantity().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testgetDashletsInstancesQuantity()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('getDashletsInstancesQuantity', $methods ), 'exists method getDashletsInstancesQuantity' );
|
|
|
|
|
$r = new ReflectionMethod('PMDashlet', 'getDashletsInstancesQuantity');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
|
|
|
|
|
2012-05-10 20:57:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers PMDashlet::loadDashletInstance
|
|
|
|
|
* @todo Implement testloadDashletInstance().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testloadDashletInstance()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('loadDashletInstance', $methods ), 'exists method loadDashletInstance' );
|
|
|
|
|
$r = new ReflectionMethod('PMDashlet', 'loadDashletInstance');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'dasInsUid');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
|
|
|
|
|
2012-05-10 20:57:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers PMDashlet::saveDashletInstance
|
|
|
|
|
* @todo Implement testsaveDashletInstance().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testsaveDashletInstance()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('saveDashletInstance', $methods ), 'exists method saveDashletInstance' );
|
|
|
|
|
$r = new ReflectionMethod('PMDashlet', 'saveDashletInstance');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'data');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
|
|
|
|
|
2012-05-10 20:57:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers PMDashlet::deleteDashletInstance
|
|
|
|
|
* @todo Implement testdeleteDashletInstance().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testdeleteDashletInstance()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('deleteDashletInstance', $methods ), 'exists method deleteDashletInstance' );
|
|
|
|
|
$r = new ReflectionMethod('PMDashlet', 'deleteDashletInstance');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'dasInsUid');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
|
|
|
|
|
2012-05-10 20:57:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers PMDashlet::getDashletsInstancesForUser
|
|
|
|
|
* @todo Implement testgetDashletsInstancesForUser().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testgetDashletsInstancesForUser()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('getDashletsInstancesForUser', $methods ), 'exists method getDashletsInstancesForUser' );
|
|
|
|
|
$r = new ReflectionMethod('PMDashlet', 'getDashletsInstancesForUser');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'userUid');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
|
|
|
|
|
2012-05-10 20:57:25 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers PMDashlet::getXTemplate
|
|
|
|
|
* @todo Implement testgetXTemplate().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testgetXTemplate()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('getXTemplate', $methods ), 'exists method getXTemplate' );
|
|
|
|
|
$r = new ReflectionMethod('PMDashlet', 'getXTemplate');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'className');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
2012-05-10 20:57:25 -04:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|