19        include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
 
   23        require_once 
'./Services/WorkflowEngine/classes/workflows/class.ilEmptyWorkflow.php';
 
   27        require_once 
'./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php';
 
   31        $this->workflow->addNode($this->node);
 
   33        require_once 
'./Services/WorkflowEngine/classes/activities/class.ilStaticMethodCallActivity.php';
 
   41            $ilSetting->delete(
'IL_PHPUNIT_TEST_MICROTIME');
 
   54            'Construction failed with valid context passed to constructor.' 
   62        $expected = 
'Services/WorkflowEngine/classes/utils/class.ilWorkflowUtils.php';
 
   65        $activity->setIncludeFilename($expected);
 
   66        $actual = $activity->getIncludeFilename();
 
   69        $this->assertEquals($actual, $expected);
 
   76        $expected = 
'ilWorkflowUtils::targetMethod';
 
   79        $activity->setClassAndMethodName($expected);
 
   80        $actual = $activity->getClassAndMethodName();
 
   83        $this->assertEquals($actual, $expected);
 
   90        $expected = array(
'homer', 
'marge', 
'bart', 
'lisa', 
'maggy');
 
   93        $activity->setParameters($expected);
 
   94        $actual = $activity->getParameters();
 
   97        $this->assertEquals($actual, $expected);
 
  104        $file = 
'Services/WorkflowEngine/test/activities/ilStaticMethodCallActivityTest.php';
 
  105        $class_and_method = 
'ilStaticMethodCallActivityTest::executionTargetMethod';
 
  106        $parameters = array(
'homer', 
'marge', 
'bart', 
'lisa', 
'maggy');
 
  109        $activity->setIncludeFilename(
$file);
 
  110        $activity->setClassAndMethodName($class_and_method);
 
  111        $activity->setParameters($parameters);
 
  112        $activity->execute();
 
  115        $this->assertTrue(
true, 
'There dont seem to be problems here.');
 
  121          'homer' => 
'homer', 0 => 
'homer',
 
  122          'marge' => 
'marge', 1 => 
'marge',
 
  123          'bart' => 
'bart', 2 => 
'bart',
 
  124          'lisa' => 
'lisa', 3 => 
'lisa',
 
  125          'maggy' => 
'maggy', 4 => 
'maggy' 
  128        if ($context == 
null) {
 
  129            throw new Exception(
'Something went wrong with the context.');
 
  132        if ($param[0] != $parameters) {
 
  133            throw new Exception(
'Something went wrong with the parameters.');
 
  145        $actual = $activity->getContext();
 
  148        if ($actual === $this->node) {
 
  149            $this->assertEquals($actual, $this->node);
 
  151            $this->assertTrue(
false, 
'Context not identical.');
 
An exception for terminatinating execution or to throw for unit testing.
@noinspection PhpIncludeInspection
@noinspection PhpIncludeInspection
ilStaticMethodCallActivityTest is part of the petri net based workflow engine.
testConstructorValidContext()
static executionTargetMethod($context, $param)
testSetGetIncludeFilename()
testSetGetClassAndMethodName()
@noinspection PhpIncludeInspection
if(!file_exists("$old.txt")) if( $old===$new) if(file_exists("$new.txt")) $file