173 lines
6.4 KiB
PHP
173 lines
6.4 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 . 'workflow/engine/classes/class.triggerLibrary.php';
|
|
|
|
/**
|
|
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:31.
|
|
*/
|
|
|
|
class classtriggerLibraryTest extends PHPUnit_Framework_TestCase
|
|
{
|
|
/**
|
|
* @var triggerLibrary
|
|
*/
|
|
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 triggerLibrary();
|
|
}
|
|
|
|
/**
|
|
* 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('triggerLibrary'); $this->assertTrue( count($methods) == 9);
|
|
}
|
|
|
|
/**
|
|
* @covers triggerLibrary::__construct
|
|
* @todo Implement test__construct().
|
|
*/
|
|
public function test__construct()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' );
|
|
$r = new ReflectionMethod('triggerLibrary', '__construct');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers triggerLibrary::getSingleton
|
|
* @todo Implement testgetSingleton().
|
|
*/
|
|
public function testgetSingleton()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('getSingleton', $methods ), 'exists method getSingleton' );
|
|
$r = new ReflectionMethod('triggerLibrary', 'getSingleton');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers triggerLibrary::serializeInstance
|
|
* @todo Implement testserializeInstance().
|
|
*/
|
|
public function testserializeInstance()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('serializeInstance', $methods ), 'exists method serializeInstance' );
|
|
$r = new ReflectionMethod('triggerLibrary', 'serializeInstance');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers triggerLibrary::unSerializeInstance
|
|
* @todo Implement testunSerializeInstance().
|
|
*/
|
|
public function testunSerializeInstance()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('unSerializeInstance', $methods ), 'exists method unSerializeInstance' );
|
|
$r = new ReflectionMethod('triggerLibrary', 'unSerializeInstance');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'serialized');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers triggerLibrary::registerFunctionsFileToLibrary
|
|
* @todo Implement testregisterFunctionsFileToLibrary().
|
|
*/
|
|
public function testregisterFunctionsFileToLibrary()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('registerFunctionsFileToLibrary', $methods ), 'exists method registerFunctionsFileToLibrary' );
|
|
$r = new ReflectionMethod('triggerLibrary', 'registerFunctionsFileToLibrary');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'filePath');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
$this->assertTrue( $params[1]->getName() == 'libraryName');
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers triggerLibrary::getMethodsFromLibraryFile
|
|
* @todo Implement testgetMethodsFromLibraryFile().
|
|
*/
|
|
public function testgetMethodsFromLibraryFile()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('getMethodsFromLibraryFile', $methods ), 'exists method getMethodsFromLibraryFile' );
|
|
$r = new ReflectionMethod('triggerLibrary', 'getMethodsFromLibraryFile');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'file');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers triggerLibrary::getRegisteredClasses
|
|
* @todo Implement testgetRegisteredClasses().
|
|
*/
|
|
public function testgetRegisteredClasses()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('getRegisteredClasses', $methods ), 'exists method getRegisteredClasses' );
|
|
$r = new ReflectionMethod('triggerLibrary', 'getRegisteredClasses');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
/**
|
|
* @covers triggerLibrary::getLibraryDefinition
|
|
* @todo Implement testgetLibraryDefinition().
|
|
*/
|
|
public function testgetLibraryDefinition()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('getLibraryDefinition', $methods ), 'exists method getLibraryDefinition' );
|
|
$r = new ReflectionMethod('triggerLibrary', 'getLibraryDefinition');
|
|
$params = $r->getParameters();
|
|
$this->assertTrue( $params[0]->getName() == 'libraryClassName');
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
}
|
|
|
|
/**
|
|
* @covers triggerLibrary::__destruct
|
|
* @todo Implement test__destruct().
|
|
*/
|
|
public function test__destruct()
|
|
{
|
|
$methods = get_class_methods($this->object);
|
|
$this->assertTrue( in_array('__destruct', $methods ), 'exists method __destruct' );
|
|
$r = new ReflectionMethod('triggerLibrary', '__destruct');
|
|
$params = $r->getParameters();
|
|
}
|
|
|
|
}
|