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
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';
@@ -11,10 +12,10 @@ require_once PATH_TRUNK . 'workflow/engine/classes/class.plugin.php';
/**
* Generated by ProcessMaker Test Unit Generator on 2012-07-12 at 22:32:32.
*/
*/
class classPMPluginTest extends PHPUnit_Framework_TestCase
{
/**
* @var PMPlugin
*/
@@ -26,7 +27,7 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
*/
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()
{
}
/**
@@ -43,7 +45,8 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
*/
public function testNumberOfMethodsInThisClass()
{
$methods = get_class_methods('PMPlugin'); $this->assertTrue( count($methods) == 22);
$methods = get_class_methods('PMPlugin');
$this->assertTrue(count($methods) == 22);
}
/**
@@ -53,16 +56,16 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testPMPlugin()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('PMPlugin', $methods ), 'exists method PMPlugin' );
$this->assertTrue(in_array('PMPlugin', $methods), 'exists method PMPlugin');
$r = new ReflectionMethod('PMPlugin', 'PMPlugin');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'sNamespace');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'sFilename');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
$this->assertTrue($params[0]->getName() == 'sNamespace');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue($params[1]->getName() == 'sFilename');
$this->assertTrue($params[1]->isArray() == false);
$this->assertTrue($params[1]->isOptional() == true);
$this->assertTrue($params[1]->getDefaultValue() == '');
}
/**
@@ -72,15 +75,15 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterMenu()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('registerMenu', $methods ), 'exists method registerMenu' );
$this->assertTrue(in_array('registerMenu', $methods), 'exists method registerMenu');
$r = new ReflectionMethod('PMPlugin', 'registerMenu');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'menuId');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'menuFilename');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
$this->assertTrue($params[0]->getName() == 'menuId');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue($params[1]->getName() == 'menuFilename');
$this->assertTrue($params[1]->isArray() == false);
$this->assertTrue($params[1]->isOptional() == false);
}
/**
@@ -90,7 +93,7 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterDashlets()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('registerDashlets', $methods ), 'exists method registerDashlets' );
$this->assertTrue(in_array('registerDashlets', $methods), 'exists method registerDashlets');
$r = new ReflectionMethod('PMPlugin', 'registerDashlets');
$params = $r->getParameters();
}
@@ -102,7 +105,7 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterReport()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('registerReport', $methods ), 'exists method registerReport' );
$this->assertTrue(in_array('registerReport', $methods), 'exists method registerReport');
$r = new ReflectionMethod('PMPlugin', 'registerReport');
$params = $r->getParameters();
}
@@ -114,7 +117,7 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterPmFunction()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('registerPmFunction', $methods ), 'exists method registerPmFunction' );
$this->assertTrue(in_array('registerPmFunction', $methods), 'exists method registerPmFunction');
$r = new ReflectionMethod('PMPlugin', 'registerPmFunction');
$params = $r->getParameters();
}
@@ -126,12 +129,12 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testsetCompanyLogo()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('setCompanyLogo', $methods ), 'exists method setCompanyLogo' );
$this->assertTrue(in_array('setCompanyLogo', $methods), 'exists method setCompanyLogo');
$r = new ReflectionMethod('PMPlugin', 'setCompanyLogo');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'filename');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue($params[0]->getName() == 'filename');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
}
/**
@@ -141,15 +144,15 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testredirectLogin()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('redirectLogin', $methods ), 'exists method redirectLogin' );
$this->assertTrue(in_array('redirectLogin', $methods), 'exists method redirectLogin');
$r = new ReflectionMethod('PMPlugin', 'redirectLogin');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'role');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'pathMethod');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
$this->assertTrue($params[0]->getName() == 'role');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue($params[1]->getName() == 'pathMethod');
$this->assertTrue($params[1]->isArray() == false);
$this->assertTrue($params[1]->isOptional() == false);
}
/**
@@ -159,15 +162,15 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterFolder()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('registerFolder', $methods ), 'exists method registerFolder' );
$this->assertTrue(in_array('registerFolder', $methods), 'exists method registerFolder');
$r = new ReflectionMethod('PMPlugin', 'registerFolder');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'sFolderId');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'sFolderName');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
$this->assertTrue($params[0]->getName() == 'sFolderId');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue($params[1]->getName() == 'sFolderName');
$this->assertTrue($params[1]->isArray() == false);
$this->assertTrue($params[1]->isOptional() == false);
}
/**
@@ -177,22 +180,22 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterStep()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('registerStep', $methods ), 'exists method registerStep' );
$this->assertTrue(in_array('registerStep', $methods), 'exists method registerStep');
$r = new ReflectionMethod('PMPlugin', 'registerStep');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'sStepId');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'sStepName');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
$this->assertTrue( $params[2]->getName() == 'sStepTitle');
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == false);
$this->assertTrue( $params[3]->getName() == 'sSetupStepPage');
$this->assertTrue( $params[3]->isArray() == false);
$this->assertTrue( $params[3]->isOptional () == true);
$this->assertTrue( $params[3]->getDefaultValue() == '');
$this->assertTrue($params[0]->getName() == 'sStepId');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue($params[1]->getName() == 'sStepName');
$this->assertTrue($params[1]->isArray() == false);
$this->assertTrue($params[1]->isOptional() == false);
$this->assertTrue($params[2]->getName() == 'sStepTitle');
$this->assertTrue($params[2]->isArray() == false);
$this->assertTrue($params[2]->isOptional() == false);
$this->assertTrue($params[3]->getName() == 'sSetupStepPage');
$this->assertTrue($params[3]->isArray() == false);
$this->assertTrue($params[3]->isOptional() == true);
$this->assertTrue($params[3]->getDefaultValue() == '');
}
/**
@@ -202,15 +205,15 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterTrigger()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('registerTrigger', $methods ), 'exists method registerTrigger' );
$this->assertTrue(in_array('registerTrigger', $methods), 'exists method registerTrigger');
$r = new ReflectionMethod('PMPlugin', 'registerTrigger');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'sTriggerId');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'sTriggerName');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
$this->assertTrue($params[0]->getName() == 'sTriggerId');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue($params[1]->getName() == 'sTriggerName');
$this->assertTrue($params[1]->isArray() == false);
$this->assertTrue($params[1]->isOptional() == false);
}
/**
@@ -220,16 +223,16 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testdelete()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('delete', $methods ), 'exists method delete' );
$this->assertTrue(in_array('delete', $methods), 'exists method delete');
$r = new ReflectionMethod('PMPlugin', 'delete');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'sFilename');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'bAbsolutePath');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == true);
$this->assertTrue( $params[1]->getDefaultValue() == '');
$this->assertTrue($params[0]->getName() == 'sFilename');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue($params[1]->getName() == 'bAbsolutePath');
$this->assertTrue($params[1]->isArray() == false);
$this->assertTrue($params[1]->isOptional() == true);
$this->assertTrue($params[1]->getDefaultValue() == '');
}
/**
@@ -239,23 +242,23 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testcopy()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('copy', $methods ), 'exists method copy' );
$this->assertTrue(in_array('copy', $methods), 'exists method copy');
$r = new ReflectionMethod('PMPlugin', 'copy');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'sSouce');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'sTarget');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
$this->assertTrue( $params[2]->getName() == 'bSourceAbsolutePath');
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == true);
$this->assertTrue( $params[2]->getDefaultValue() == '');
$this->assertTrue( $params[3]->getName() == 'bTargetAbsolutePath');
$this->assertTrue( $params[3]->isArray() == false);
$this->assertTrue( $params[3]->isOptional () == true);
$this->assertTrue( $params[3]->getDefaultValue() == '');
$this->assertTrue($params[0]->getName() == 'sSouce');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue($params[1]->getName() == 'sTarget');
$this->assertTrue($params[1]->isArray() == false);
$this->assertTrue($params[1]->isOptional() == false);
$this->assertTrue($params[2]->getName() == 'bSourceAbsolutePath');
$this->assertTrue($params[2]->isArray() == false);
$this->assertTrue($params[2]->isOptional() == true);
$this->assertTrue($params[2]->getDefaultValue() == '');
$this->assertTrue($params[3]->getName() == 'bTargetAbsolutePath');
$this->assertTrue($params[3]->isArray() == false);
$this->assertTrue($params[3]->isOptional() == true);
$this->assertTrue($params[3]->getDefaultValue() == '');
}
/**
@@ -265,23 +268,23 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testrename()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('rename', $methods ), 'exists method rename' );
$this->assertTrue(in_array('rename', $methods), 'exists method rename');
$r = new ReflectionMethod('PMPlugin', 'rename');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'sSouce');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'sTarget');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
$this->assertTrue( $params[2]->getName() == 'bSourceAbsolutePath');
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == true);
$this->assertTrue( $params[2]->getDefaultValue() == '');
$this->assertTrue( $params[3]->getName() == 'bTargetAbsolutePath');
$this->assertTrue( $params[3]->isArray() == false);
$this->assertTrue( $params[3]->isOptional () == true);
$this->assertTrue( $params[3]->getDefaultValue() == '');
$this->assertTrue($params[0]->getName() == 'sSouce');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue($params[1]->getName() == 'sTarget');
$this->assertTrue($params[1]->isArray() == false);
$this->assertTrue($params[1]->isOptional() == false);
$this->assertTrue($params[2]->getName() == 'bSourceAbsolutePath');
$this->assertTrue($params[2]->isArray() == false);
$this->assertTrue($params[2]->isOptional() == true);
$this->assertTrue($params[2]->getDefaultValue() == '');
$this->assertTrue($params[3]->getName() == 'bTargetAbsolutePath');
$this->assertTrue($params[3]->isArray() == false);
$this->assertTrue($params[3]->isOptional() == true);
$this->assertTrue($params[3]->getDefaultValue() == '');
}
/**
@@ -291,15 +294,15 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterBreakPageTemplate()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('registerBreakPageTemplate', $methods ), 'exists method registerBreakPageTemplate' );
$this->assertTrue(in_array('registerBreakPageTemplate', $methods), 'exists method registerBreakPageTemplate');
$r = new ReflectionMethod('PMPlugin', 'registerBreakPageTemplate');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'pageId');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'templateFilename');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
$this->assertTrue($params[0]->getName() == 'pageId');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue($params[1]->getName() == 'templateFilename');
$this->assertTrue($params[1]->isArray() == false);
$this->assertTrue($params[1]->isOptional() == false);
}
/**
@@ -309,12 +312,12 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterCss()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('registerCss', $methods ), 'exists method registerCss' );
$this->assertTrue(in_array('registerCss', $methods), 'exists method registerCss');
$r = new ReflectionMethod('PMPlugin', 'registerCss');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'sCssFile');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue($params[0]->getName() == 'sCssFile');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
}
/**
@@ -324,15 +327,15 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterToolbarFile()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('registerToolbarFile', $methods ), 'exists method registerToolbarFile' );
$this->assertTrue(in_array('registerToolbarFile', $methods), 'exists method registerToolbarFile');
$r = new ReflectionMethod('PMPlugin', 'registerToolbarFile');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'sToolbarId');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'filename');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
$this->assertTrue($params[0]->getName() == 'sToolbarId');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue($params[1]->getName() == 'filename');
$this->assertTrue($params[1]->isArray() == false);
$this->assertTrue($params[1]->isOptional() == false);
}
/**
@@ -342,24 +345,25 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterCaseSchedulerPlugin()
{
$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');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'sActionId');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'sActionForm');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
$this->assertTrue( $params[2]->getName() == 'sActionSave');
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == false);
$this->assertTrue( $params[3]->getName() == 'sActionExecute');
$this->assertTrue( $params[3]->isArray() == false);
$this->assertTrue( $params[3]->isOptional () == false);
$this->assertTrue( $params[4]->getName() == 'sActionGetFields');
$this->assertTrue( $params[4]->isArray() == false);
$this->assertTrue( $params[4]->isOptional () == false);
$this->assertTrue($params[0]->getName() == 'sActionId');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue($params[1]->getName() == 'sActionForm');
$this->assertTrue($params[1]->isArray() == false);
$this->assertTrue($params[1]->isOptional() == false);
$this->assertTrue($params[2]->getName() == 'sActionSave');
$this->assertTrue($params[2]->isArray() == false);
$this->assertTrue($params[2]->isOptional() == false);
$this->assertTrue($params[3]->getName() == 'sActionExecute');
$this->assertTrue($params[3]->isArray() == false);
$this->assertTrue($params[3]->isOptional() == false);
$this->assertTrue($params[4]->getName() == 'sActionGetFields');
$this->assertTrue($params[4]->isArray() == false);
$this->assertTrue($params[4]->isOptional() == false);
}
/**
@@ -369,19 +373,20 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterTaskExtendedProperty()
{
$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');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'sPage');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'sName');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
$this->assertTrue( $params[2]->getName() == 'sIcon');
$this->assertTrue( $params[2]->isArray() == false);
$this->assertTrue( $params[2]->isOptional () == true);
$this->assertTrue( $params[2]->getDefaultValue() == '');
$this->assertTrue($params[0]->getName() == 'sPage');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue($params[1]->getName() == 'sName');
$this->assertTrue($params[1]->isArray() == false);
$this->assertTrue($params[1]->isOptional() == false);
$this->assertTrue($params[2]->getName() == 'sIcon');
$this->assertTrue($params[2]->isArray() == false);
$this->assertTrue($params[2]->isOptional() == true);
$this->assertTrue($params[2]->getDefaultValue() == '');
}
/**
@@ -391,15 +396,15 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterJavascript()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('registerJavascript', $methods ), 'exists method registerJavascript' );
$this->assertTrue(in_array('registerJavascript', $methods), 'exists method registerJavascript');
$r = new ReflectionMethod('PMPlugin', 'registerJavascript');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'sCoreJsFile');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'pluginJsFile');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
$this->assertTrue($params[0]->getName() == 'sCoreJsFile');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue($params[1]->getName() == 'pluginJsFile');
$this->assertTrue($params[1]->isArray() == false);
$this->assertTrue($params[1]->isOptional() == false);
}
/**
@@ -409,15 +414,15 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testunregisterJavascript()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('unregisterJavascript', $methods ), 'exists method unregisterJavascript' );
$this->assertTrue(in_array('unregisterJavascript', $methods), 'exists method unregisterJavascript');
$r = new ReflectionMethod('PMPlugin', 'unregisterJavascript');
$params = $r->getParameters();
$this->assertTrue( $params[0]->getName() == 'sCoreJsFile');
$this->assertTrue( $params[0]->isArray() == false);
$this->assertTrue( $params[0]->isOptional () == false);
$this->assertTrue( $params[1]->getName() == 'pluginJsFile');
$this->assertTrue( $params[1]->isArray() == false);
$this->assertTrue( $params[1]->isOptional () == false);
$this->assertTrue($params[0]->getName() == 'sCoreJsFile');
$this->assertTrue($params[0]->isArray() == false);
$this->assertTrue($params[0]->isOptional() == false);
$this->assertTrue($params[1]->getName() == 'pluginJsFile');
$this->assertTrue($params[1]->isArray() == false);
$this->assertTrue($params[1]->isOptional() == false);
}
/**
@@ -427,7 +432,7 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testregisterDashboard()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('registerDashboard', $methods ), 'exists method registerDashboard' );
$this->assertTrue(in_array('registerDashboard', $methods), 'exists method registerDashboard');
$r = new ReflectionMethod('PMPlugin', 'registerDashboard');
$params = $r->getParameters();
}
@@ -439,9 +444,9 @@ class classPMPluginTest extends PHPUnit_Framework_TestCase
public function testgetExternalStepAction()
{
$methods = get_class_methods($this->object);
$this->assertTrue( in_array('getExternalStepAction', $methods ), 'exists method getExternalStepAction' );
$this->assertTrue(in_array('getExternalStepAction', $methods), 'exists method getExternalStepAction');
$r = new ReflectionMethod('PMPlugin', 'getExternalStepAction');
$params = $r->getParameters();
}
}
}