24 chdir(dirname(__FILE__));
25 chdir(
'../../../../');
28 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
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.ilStopWorkflowActivity.php';
49 $this->test_dir = vfs\vfsStream::setup(
'example');
55 if ($ilSetting != null) {
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.');
92 $workflowMock = $this->getMockBuilder(
'ilEmptyWorkflow')
93 ->setMethods(array(
'stopWorkflow'))
96 $workflowMock->expects($this->once())
97 ->method(
'stopWorkflow');
103 $activity->execute();
ilStopWorkflowActivityTest is part of the workflow engine.
$test_dir
vfsStream Test Directory, see setup.
testConstructorValidContext()