Merge pull request #265 from hector-cortez/master

BUG 0000 Adjustment in te class classPMPluginTest.php
This commit is contained in:
julceslauhub
2012-07-13 12:54:46 -07:00

View File

@@ -1,4 +1,5 @@
<?php <?php
require_once PATH_TRUNK . 'gulliver/thirdparty/smarty/libs/Smarty.class.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.xmlform.php';
require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php'; require_once PATH_TRUNK . 'gulliver/system/class.xmlDocument.php';
@@ -12,9 +13,9 @@ require_once PATH_TRUNK . 'workflow/engine/classes/class.plugin.php';
/** /**
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32. * Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
*/ */
class classPMPluginTest extends PHPUnit_Framework_TestCase class classPMPluginTest extends PHPUnit_Framework_TestCase
{ {
/** /**
* @var PMPlugin * @var PMPlugin
*/ */
@@ -26,7 +27,7 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
*/ */
protected function setUp() protected function setUp()
{ {
$this->object = new PMPlugin(); $this->object = new PMPlugin('sNamespace', 'sFilename');
} }
/** /**
@@ -35,6 +36,7 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
*/ */
protected function tearDown() protected function tearDown()
{ {
} }
/** /**
@@ -43,7 +45,8 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
*/ */
public function testNumberOfMethodsInThisClass() public function testNumberOfMethodsInThisClass()
{ {
$methods = get_class_methods('PMPlugin'); $this->assertTrue( count($methods) == 22); $methods = get_class_methods('PMPlugin');
$this->assertTrue(count($methods) == 22);
} }
/** /**
@@ -342,7 +345,8 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterCaseSchedulerPlugin() public function testregisterCaseSchedulerPlugin()
{ {
$methods = get_class_methods($this->object); $methods = get_class_methods($this->object);
$this->assertTrue( in_array('registerCaseSchedulerPlugin', $methods ), 'exists method registerCaseSchedulerPlugin' ); $this->assertTrue(in_array('registerCaseSchedulerPlugin', $methods),
'exists method registerCaseSchedulerPlugin');
$r = new ReflectionMethod('PMPlugin', 'registerCaseSchedulerPlugin'); $r = new ReflectionMethod('PMPlugin', 'registerCaseSchedulerPlugin');
$params = $r->getParameters(); $params = $r->getParameters();
$this->assertTrue($params[0]->getName() == 'sActionId'); $this->assertTrue($params[0]->getName() == 'sActionId');
@@ -369,7 +373,8 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterTaskExtendedProperty() public function testregisterTaskExtendedProperty()
{ {
$methods = get_class_methods($this->object); $methods = get_class_methods($this->object);
$this->assertTrue( in_array('registerTaskExtendedProperty', $methods ), 'exists method registerTaskExtendedProperty' ); $this->assertTrue(in_array('registerTaskExtendedProperty', $methods),
'exists method registerTaskExtendedProperty');
$r = new ReflectionMethod('PMPlugin', 'registerTaskExtendedProperty'); $r = new ReflectionMethod('PMPlugin', 'registerTaskExtendedProperty');
$params = $r->getParameters(); $params = $r->getParameters();
$this->assertTrue($params[0]->getName() == 'sPage'); $this->assertTrue($params[0]->getName() == 'sPage');
@@ -443,5 +448,5 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
$r = new ReflectionMethod('PMPlugin', 'getExternalStepAction'); $r = new ReflectionMethod('PMPlugin', 'getExternalStepAction');
$params = $r->getParameters(); $params = $r->getParameters();
} }
} }