310 lines
12 KiB
PHP
310 lines
12 KiB
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 . 'gulliver/system/class.templatePower.php';
|
|
|
|
/**
|
|
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:23.
|
|
*/
|
|
|
|
class classTemplatePowerTest extends PHPUnit_Framework_TestCase
|
|
{
|
|
/**
|
|
* @var TemplatePower
|
|
*/
|
|
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 TemplatePower();
|
|
}
|
|
|
|
/**
|
|
* 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()
|
|
{
|
|
$methods = get_class_methods('TemplatePower'); $this->assertTrue( count($methods) == 25);
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::TemplatePower
|
|
* @todo Implement testTemplatePower().
|
|
*/
|
|
public function testTemplatePower()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('TemplatePower', $methods ), 'exists method TemplatePower' );
|
|
$r = new ReflectionMethod('TemplatePower', 'TemplatePower');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'tpl_file');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
$this->assertTrue( $params[0]->getDefaultValue() == '');
|
|
$this->assertTrue( $params[1]->getName() == 'type');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
$this->assertTrue( $params[1]->getDefaultValue() == '0');
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::__deSerializeTPL
|
|
* @todo Implement test__deSerializeTPL().
|
|
*/
|
|
public function test__deSerializeTPL()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('__deSerializeTPL', $methods ), 'exists method __deSerializeTPL' );
|
|
$r = new ReflectionMethod('TemplatePower', '__deSerializeTPL');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'stpl_file');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'type');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::__makeContentRoot
|
|
* @todo Implement test__makeContentRoot().
|
|
*/
|
|
public function test__makeContentRoot()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('__makeContentRoot', $methods ), 'exists method __makeContentRoot' );
|
|
$r = new ReflectionMethod('TemplatePower', '__makeContentRoot');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::__assign
|
|
* @todo Implement test__assign().
|
|
*/
|
|
public function test__assign()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('__assign', $methods ), 'exists method __assign' );
|
|
$r = new ReflectionMethod('TemplatePower', '__assign');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'varname');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'value');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::__assignGlobal
|
|
* @todo Implement test__assignGlobal().
|
|
*/
|
|
public function test__assignGlobal()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('__assignGlobal', $methods ), 'exists method __assignGlobal' );
|
|
$r = new ReflectionMethod('TemplatePower', '__assignGlobal');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'varname');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'value');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::__outputContent
|
|
* @todo Implement test__outputContent().
|
|
*/
|
|
public function test__outputContent()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('__outputContent', $methods ), 'exists method __outputContent' );
|
|
$r = new ReflectionMethod('TemplatePower', '__outputContent');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'blockname');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::__printVars
|
|
* @todo Implement test__printVars().
|
|
*/
|
|
public function test__printVars()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('__printVars', $methods ), 'exists method __printVars' );
|
|
$r = new ReflectionMethod('TemplatePower', '__printVars');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::serializedBase
|
|
* @todo Implement testserializedBase().
|
|
*/
|
|
public function testserializedBase()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('serializedBase', $methods ), 'exists method serializedBase' );
|
|
$r = new ReflectionMethod('TemplatePower', 'serializedBase');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::showUnAssigned
|
|
* @todo Implement testshowUnAssigned().
|
|
*/
|
|
public function testshowUnAssigned()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('showUnAssigned', $methods ), 'exists method showUnAssigned' );
|
|
$r = new ReflectionMethod('TemplatePower', 'showUnAssigned');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'state');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
$this->assertTrue( $params[0]->getDefaultValue() == '1');
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::prepare
|
|
* @todo Implement testprepare().
|
|
*/
|
|
public function testprepare()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('prepare', $methods ), 'exists method prepare' );
|
|
$r = new ReflectionMethod('TemplatePower', 'prepare');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::newBlock
|
|
* @todo Implement testnewBlock().
|
|
*/
|
|
public function testnewBlock()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('newBlock', $methods ), 'exists method newBlock' );
|
|
$r = new ReflectionMethod('TemplatePower', 'newBlock');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'blockname');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::assignGlobal
|
|
* @todo Implement testassignGlobal().
|
|
*/
|
|
public function testassignGlobal()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('assignGlobal', $methods ), 'exists method assignGlobal' );
|
|
$r = new ReflectionMethod('TemplatePower', 'assignGlobal');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'varname');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'value');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::assign
|
|
* @todo Implement testassign().
|
|
*/
|
|
public function testassign()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('assign', $methods ), 'exists method assign' );
|
|
$r = new ReflectionMethod('TemplatePower', 'assign');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'varname');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'value');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
$this->assertTrue( $params[1]->getDefaultValue() == '');
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::gotoBlock
|
|
* @todo Implement testgotoBlock().
|
|
*/
|
|
public function testgotoBlock()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('gotoBlock', $methods ), 'exists method gotoBlock' );
|
|
$r = new ReflectionMethod('TemplatePower', 'gotoBlock');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'blockname');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::getVarValue
|
|
* @todo Implement testgetVarValue().
|
|
*/
|
|
public function testgetVarValue()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('getVarValue', $methods ), 'exists method getVarValue' );
|
|
$r = new ReflectionMethod('TemplatePower', 'getVarValue');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'varname');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::printToScreen
|
|
* @todo Implement testprintToScreen().
|
|
*/
|
|
public function testprintToScreen()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('printToScreen', $methods ), 'exists method printToScreen' );
|
|
$r = new ReflectionMethod('TemplatePower', 'printToScreen');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers TemplatePower::getOutputContent
|
|
* @todo Implement testgetOutputContent().
|
|
*/
|
|
public function testgetOutputContent()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('getOutputContent', $methods ), 'exists method getOutputContent' );
|
|
$r = new ReflectionMethod('TemplatePower', 'getOutputContent');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
}
|