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.unitTest.php';
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 20:28:31.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
class classunitTestTest extends PHPUnit_Framework_TestCase
|
|
|
|
|
{
|
|
|
|
|
/**
|
|
|
|
|
* @var unitTest
|
|
|
|
|
*/
|
|
|
|
|
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 unitTest();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 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) == 6);
|
|
|
|
|
}
|
|
|
|
|
|
2012-05-10 20:51:34 -04:00
|
|
|
/**
|
|
|
|
|
* @covers unitTest::unitTest
|
|
|
|
|
* @todo Implement testunitTest().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testunitTest()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('unitTest', $methods ), 'exists method unitTest' );
|
|
|
|
|
$r = new ReflectionMethod('unitTest', 'unitTest');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'ymlFile');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'testLime');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'testDomain');
|
|
|
|
|
$this->assertTrue( $params[2]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[2]->isOptional () == false);
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
|
|
|
|
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers unitTest::load
|
|
|
|
|
* @todo Implement testload().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testload()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('load', $methods ), 'exists method load' );
|
|
|
|
|
$r = new ReflectionMethod('unitTest', 'load');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'testName');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'fields');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[1]->getDefaultValue() == 'Array');
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
|
|
|
|
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers unitTest::runSingle
|
|
|
|
|
* @todo Implement testrunSingle().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testrunSingle()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('runSingle', $methods ), 'exists method runSingle' );
|
|
|
|
|
$r = new ReflectionMethod('unitTest', 'runSingle');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'fields');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[0]->getDefaultValue() == 'Array');
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
|
|
|
|
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers unitTest::runMultiple
|
|
|
|
|
* @todo Implement testrunMultiple().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testrunMultiple()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('runMultiple', $methods ), 'exists method runMultiple' );
|
|
|
|
|
$r = new ReflectionMethod('unitTest', 'runMultiple');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'fields');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[0]->getDefaultValue() == 'Array');
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'count');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[1]->getDefaultValue() == '-1');
|
|
|
|
|
$this->assertTrue( $params[2]->getName() == 'start');
|
|
|
|
|
$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.');
|
|
|
|
|
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers unitTest::runAll
|
|
|
|
|
* @todo Implement testrunAll().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testrunAll()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('runAll', $methods ), 'exists method runAll' );
|
|
|
|
|
$r = new ReflectionMethod('unitTest', 'runAll');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'fields');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == true);
|
|
|
|
|
$this->assertTrue( $params[0]->getDefaultValue() == 'Array');
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
|
|
|
|
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @covers unitTest::sampleTestFunction
|
|
|
|
|
* @todo Implement testsampleTestFunction().
|
|
|
|
|
*/
|
2012-07-12 20:40:06 -04:00
|
|
|
public function testsampleTestFunction()
|
|
|
|
|
{
|
|
|
|
|
$methods = get_class_methods($this->object);
|
|
|
|
|
$this->assertTrue( in_array('sampleTestFunction', $methods ), 'exists method sampleTestFunction' );
|
|
|
|
|
$r = new ReflectionMethod('unitTest', 'sampleTestFunction');
|
|
|
|
|
$params = $r->getParameters();
|
|
|
|
|
$this->assertTrue( $params[0]->getName() == 'testCase');
|
|
|
|
|
$this->assertTrue( $params[0]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[0]->isOptional () == false);
|
|
|
|
|
$this->assertTrue( $params[1]->getName() == 'Fields');
|
|
|
|
|
$this->assertTrue( $params[1]->isArray() == false);
|
|
|
|
|
$this->assertTrue( $params[1]->isOptional () == false);
|
|
|
|
|
$this->markTestIncomplete('This test has not been implemented yet.');
|
|
|
|
|
|
2012-05-10 20:51:34 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|