php units for all classes
This commit is contained in:
@@ -1,135 +1,251 @@
|
||||
<?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/thirdparty/propel/Propel.php' ;
|
||||
require_once PATH_TRUNK . 'gulliver/thirdparty/creole/Creole.php' ;
|
||||
require_once PATH_TRUNK . 'workflow/engine/classes/class.memcached.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.memcached.php';
|
||||
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-05-10 at 20:56:17.
|
||||
*/
|
||||
/**
|
||||
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 20:28:38.
|
||||
*/
|
||||
|
||||
class classPMmemcachedTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @var PMmemcached
|
||||
*/
|
||||
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 PMmemcached();
|
||||
}
|
||||
|
||||
/**
|
||||
* 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) == 12);
|
||||
}
|
||||
|
||||
class classPMmemcachedTest extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @covers PMmemcached::__construct
|
||||
* @todo Implement test__construct().
|
||||
*/
|
||||
public function test__construct()
|
||||
{
|
||||
if (class_exists('PMmemcached')) {
|
||||
$methods = get_class_methods( 'PMmemcached');
|
||||
$this->assertTrue( in_array( '__construct', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function test__construct()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__construct', $methods ), 'exists method __construct' );
|
||||
$r = new ReflectionMethod('PMmemcached', '__construct');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::getSingleton
|
||||
* @todo Implement testgetSingleton().
|
||||
*/
|
||||
public function testgetSingleton()
|
||||
{
|
||||
if (class_exists('PMmemcached')) {
|
||||
$methods = get_class_methods( 'PMmemcached');
|
||||
$this->assertTrue( in_array( 'getSingleton', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testgetSingleton()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getSingleton', $methods ), 'exists method getSingleton' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'getSingleton');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'workspace');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::__clone
|
||||
* @todo Implement test__clone().
|
||||
*/
|
||||
public function test__clone()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__clone', $methods ), 'exists method __clone' );
|
||||
$r = new ReflectionMethod('PMmemcached', '__clone');
|
||||
$params = $r->getParameters();
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::__wakeup
|
||||
* @todo Implement test__wakeup().
|
||||
*/
|
||||
public function test__wakeup()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('__wakeup', $methods ), 'exists method __wakeup' );
|
||||
$r = new ReflectionMethod('PMmemcached', '__wakeup');
|
||||
$params = $r->getParameters();
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::set
|
||||
* @todo Implement testset().
|
||||
*/
|
||||
public function testset()
|
||||
{
|
||||
if (class_exists('PMmemcached')) {
|
||||
$methods = get_class_methods( 'PMmemcached');
|
||||
$this->assertTrue( in_array( 'set', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testset()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('set', $methods ), 'exists method set' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'set');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'key');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->assertTrue( $params[1]->getName() == 'object');
|
||||
$this->assertTrue( $params[1]->isArray() == false);
|
||||
$this->assertTrue( $params[1]->isOptional () == false);
|
||||
$this->assertTrue( $params[2]->getName() == 'timeout');
|
||||
$this->assertTrue( $params[2]->isArray() == false);
|
||||
$this->assertTrue( $params[2]->isOptional () == true);
|
||||
$this->assertTrue( $params[2]->getDefaultValue() == '0');
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::get
|
||||
* @todo Implement testget().
|
||||
*/
|
||||
public function testget()
|
||||
{
|
||||
if (class_exists('PMmemcached')) {
|
||||
$methods = get_class_methods( 'PMmemcached');
|
||||
$this->assertTrue( in_array( 'get', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testget()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('get', $methods ), 'exists method get' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'get');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'key');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::add
|
||||
* @todo Implement testadd().
|
||||
*/
|
||||
public function testadd()
|
||||
{
|
||||
if (class_exists('PMmemcached')) {
|
||||
$methods = get_class_methods( 'PMmemcached');
|
||||
$this->assertTrue( in_array( 'add', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testadd()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('add', $methods ), 'exists method add' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'add');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'key');
|
||||
$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);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::increment
|
||||
* @todo Implement testincrement().
|
||||
*/
|
||||
public function testincrement()
|
||||
{
|
||||
if (class_exists('PMmemcached')) {
|
||||
$methods = get_class_methods( 'PMmemcached');
|
||||
$this->assertTrue( in_array( 'increment', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testincrement()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('increment', $methods ), 'exists method increment' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'increment');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'key');
|
||||
$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);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::delete
|
||||
* @todo Implement testdelete().
|
||||
*/
|
||||
public function testdelete()
|
||||
{
|
||||
if (class_exists('PMmemcached')) {
|
||||
$methods = get_class_methods( 'PMmemcached');
|
||||
$this->assertTrue( in_array( 'delete', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testdelete()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('delete', $methods ), 'exists method delete' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'delete');
|
||||
$params = $r->getParameters();
|
||||
$this->assertTrue( $params[0]->getName() == 'key');
|
||||
$this->assertTrue( $params[0]->isArray() == false);
|
||||
$this->assertTrue( $params[0]->isOptional () == false);
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::flush
|
||||
* @todo Implement testflush().
|
||||
*/
|
||||
public function testflush()
|
||||
{
|
||||
if (class_exists('PMmemcached')) {
|
||||
$methods = get_class_methods( 'PMmemcached');
|
||||
$this->assertTrue( in_array( 'flush', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testflush()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('flush', $methods ), 'exists method flush' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'flush');
|
||||
$params = $r->getParameters();
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::getStats
|
||||
* @todo Implement testgetStats().
|
||||
*/
|
||||
public function testgetStats()
|
||||
{
|
||||
if (class_exists('PMmemcached')) {
|
||||
$methods = get_class_methods( 'PMmemcached');
|
||||
$this->assertTrue( in_array( 'getStats', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testgetStats()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('getStats', $methods ), 'exists method getStats' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'getStats');
|
||||
$params = $r->getParameters();
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @covers PMmemcached::printDetails
|
||||
* @todo Implement testprintDetails().
|
||||
*/
|
||||
public function testprintDetails()
|
||||
{
|
||||
if (class_exists('PMmemcached')) {
|
||||
$methods = get_class_methods( 'PMmemcached');
|
||||
$this->assertTrue( in_array( 'printDetails', $methods ), 'seems like this function is outside this class' );
|
||||
}
|
||||
public function testprintDetails()
|
||||
{
|
||||
$methods = get_class_methods($this->object);
|
||||
$this->assertTrue( in_array('printDetails', $methods ), 'exists method printDetails' );
|
||||
$r = new ReflectionMethod('PMmemcached', 'printDetails');
|
||||
$params = $r->getParameters();
|
||||
$this->markTestIncomplete('This test has not been implemented yet.');
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user