23 chdir(dirname(__FILE__));
24 chdir(
'../../../../');
27 include_once(
"./Services/PHPUnit/classes/class.ilUnitUtil.php");
29 }
catch (Exception $exception) {
30 if (!defined(
'IL_PHPUNIT_TEST')) {
31 define(
'IL_PHPUNIT_TEST',
false);
36 require_once
'./Services/WorkflowEngine/classes/workflows/class.ilEmptyWorkflow.php';
40 require_once
'./Services/WorkflowEngine/classes/nodes/class.ilBasicNode.php';
44 $this->workflow->addNode($this->node);
46 require_once
'./Services/WorkflowEngine/classes/activities/class.ilStopWorkflowActivity.php';
48 $this->test_dir = vfs\vfsStream::setup(
'example');
69 'Construction failed with valid context passed to constructor.'
79 $actual = $activity->getContext();
82 if ($actual === $this->node) {
83 $this->assertEquals($actual, $this->node);
85 $this->assertTrue(
false,
'Context not identical.');
91 $workflowMock = $this->getMockBuilder(
'ilEmptyWorkflow')
92 ->setMethods(array(
'stopWorkflow'))
95 $workflowMock->expects($this->
once())
96 ->method(
'stopWorkflow');
102 $activity->execute();
An exception for terminatinating execution or to throw for unit testing.
@noinspection PhpIncludeInspection
@noinspection PhpIncludeInspection
ilStopWorkflowActivityTest is part of the workflow engine.
testConstructorValidContext()
$test_dir
vfsStream Test Directory, see setup.
@noinspection PhpIncludeInspection
once($eventName, callable $callBack, $priority=100)
Subscribe to an event exactly once.