ILIAS  release_7 Revision v7.30-3-g800a261c036
class.ilTestProcessLocker.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3
10abstract class ilTestProcessLocker
11{
15 protected function executeOperation(callable $operation)
16 {
17 $operation();
18 }
19
23 final public function executeTestStartLockOperation(callable $operation)
24 {
26 $this->executeOperation($operation);
28 }
29
34 {
35 }
36
41 {
42 }
43
48 final public function executeRandomPassBuildOperation(callable $operation, $withTaxonomyTables = false)
49 {
50 $this->onBeforeExecutingRandomPassBuildOperation($withTaxonomyTables);
51 $this->executeOperation($operation);
52 $this->onAfterExecutingRandomPassBuildOperation($withTaxonomyTables);
53 }
54
58 protected function onBeforeExecutingRandomPassBuildOperation($withTaxonomyTables = false)
59 {
60 }
61
65 protected function onAfterExecutingRandomPassBuildOperation($withTaxonomyTables = false)
66 {
67 }
68
69
73 final public function executeTestFinishOperation(callable $operation)
74 {
76 $this->executeOperation($operation);
78 }
79
80 final public function executeNamedOperation(string $operationDescriptor, callable $operation) : void
81 {
82 $this->onBeforeExecutingNamedOperation($operationDescriptor);
83 $this->executeOperation($operation);
84 $this->onAfterExecutingNamedOperation($operationDescriptor);
85 }
86
91 {
92 }
93
98 {
99 }
100
101 protected function onBeforeExecutingNamedOperation(string $operationDescriptor) : void
102 {
103
104 }
105
106 protected function onAfterExecutingNamedOperation(string $operationDescriptor) : void
107 {
108 }
109}
An exception for terminatinating execution or to throw for unit testing.
executeOperation(callable $operation)
onBeforeExecutingRandomPassBuildOperation($withTaxonomyTables=false)
executeNamedOperation(string $operationDescriptor, callable $operation)
executeTestFinishOperation(callable $operation)
onAfterExecutingRandomPassBuildOperation($withTaxonomyTables=false)
onAfterExecutingNamedOperation(string $operationDescriptor)
executeTestStartLockOperation(callable $operation)
executeRandomPassBuildOperation(callable $operation, $withTaxonomyTables=false)
onBeforeExecutingNamedOperation(string $operationDescriptor)