5use PHPUnit\Framework\TestCase;
24 chdir(dirname(__FILE__));
25 chdir(
'../../../../');
28 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
30 }
catch (Exception $exception) {
31 if (!defined(
'IL_PHPUNIT_TEST')) {
32 define(
'IL_PHPUNIT_TEST',
false);
37 require_once
'./Services/WorkflowEngine/classes/workflows/class.ilEmptyWorkflow.php';
41 require_once
'./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php';
45 $this->workflow->addNode($this->node);
47 require_once
'./Services/WorkflowEngine/classes/activities/class.ilScriptActivity.php';
49 $this->test_dir = vfs\vfsStream::setup(
'example');
70 'Construction failed with valid context passed to constructor.'
80 $actual = $activity->getContext();
83 if ($actual === $this->node) {
84 $this->assertEquals($actual, $this->node);
86 $this->assertTrue(
false,
'Context not identical.');
95 $activity->setMethod(
function () {
96 return 'Hallo, Welt!';
103 $this->assertEquals(
$response(),
"Hallo, Welt!");
An exception for terminatinating execution or to throw for unit testing.
@noinspection PhpIncludeInspection
@noinspection PhpIncludeInspection
ilScriptActivityTest is part of the workflow engine.
$test_dir
vfsStream Test Directory, see setup.
testConstructorValidContext()
@noinspection PhpIncludeInspection