23 chdir( dirname ( __FILE__ ) );
24 chdir(
'../../../../');
28 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
33 if (!
defined(
'IL_PHPUNIT_TEST'))
35 define(
'IL_PHPUNIT_TEST', FALSE);
40 require_once
'./Services/WorkflowEngine/classes/workflows/class.ilEmptyWorkflow.php';
44 require_once
'./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php';
48 $this->workflow->addNode($this->node);
50 require_once
'./Services/WorkflowEngine/classes/activities/class.ilScriptActivity.php';
52 $this->test_dir = vfs\vfsStream::setup(
'example');
58 if ($ilSetting != NULL)
74 'Construction failed with valid context passed to constructor.' 84 $actual = $activity->getContext();
87 if ($actual === $this->node)
89 $this->assertEquals($actual, $this->node);
91 $this->assertTrue(
false,
'Context not identical.');
100 $code =
"return 'Hallo, Welt!';";
101 $activity->setMethod(create_function(null,
$code));
104 $response = $activity->getScript();
107 $this->assertEquals($response(),
"Hallo, Welt!");
ilScriptActivityTest is part of the workflow engine.
$test_dir
vfsStream Test Directory, see setup.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
testConstructorValidContext()