ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
d
e
f
g
h
i
j
l
m
p
s
t
w
+
Functions
_
a
b
c
f
g
h
i
s
t
w
+
Variables
$
c
d
e
f
g
h
j
l
m
p
s
t
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Files
File List
+
Globals
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
+
Variables
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
BasicTaskManagerTest.php
Go to the documentation of this file.
1
<?php
9
namespace
BackgroundTasks\Implementation
;
10
11
use
ILIAS\BackgroundTasks\Implementation\Bucket\BasicBucket
;
12
use
ILIAS\BackgroundTasks\Implementation\Bucket\State
;
13
use
ILIAS\BackgroundTasks\Implementation\Persistence\BasicPersistence
;
14
use
ILIAS\BackgroundTasks\Implementation\TaskManager\BasicTaskManager
;
15
use
ILIAS\BackgroundTasks\Implementation\TaskManager\SyncTaskManager
;
16
use
ILIAS\BackgroundTasks\Implementation\Tasks\DownloadInteger
;
17
use
ILIAS\BackgroundTasks\Implementation\Tasks\PlusJob
;
18
use
ILIAS\DI\Container
;
19
use
ILIAS\BackgroundTasks\Dependencies\DependencyMap\EmptyDependencyMap
;
20
use
ILIAS\BackgroundTasks\Dependencies\Injector
;
21
use
Mockery\Adapter\Phpunit\MockeryPHPUnitIntegration
;
22
use
PHPUnit\Framework\TestCase
;
23
24
class
BasicTaskManagerTest
extends
TestCase
25
{
26
use
MockeryPHPUnitIntegration
;
27
28
protected
$taskManager
;
29
protected
$bucket
;
30
31
public
function
setUp
() : void
32
{
33
$persistence = \Mockery::mock(BasicPersistence::class);
34
$this->taskManager =
new
SyncTaskManager
($persistence);
35
}
36
40
public
function
testBasicTaskManager()
41
{
42
$dic
=
new
Container
();
43
44
$factory
=
new
Injector
(
$dic
,
new
EmptyDependencyMap
());
45
46
$bucket
=
new
BasicBucket
();
47
$bucket
->setUserId(3);
48
$bucket
->setState(
State::SCHEDULED
);
49
51
$a
=
$factory
->createInstance(PlusJob::class);
53
$b
=
$factory
->createInstance(PlusJob::class);
55
$c
=
$factory
->createInstance(PlusJob::class);
56
57
$a
->setInput([1, 1]);
58
$b
->setInput([1, 1]);
59
$c
->setInput([
$a
,
$b
]);
60
62
$userInteraction =
$factory
->createInstance(DownloadInteger::class);
63
$userInteraction->setInput([
$c
]);
64
65
$bucket
->setTask($userInteraction);
66
67
$this->bucket =
$bucket
;
68
}
69
}
ILIAS\BackgroundTasks\Dependencies\Injector
Definition:
Injector.php:19
BackgroundTasks\Implementation\BasicTaskManagerTest
Definition:
BasicTaskManagerTest.php:24
ILIAS\BackgroundTasks\Dependencies\DependencyMap\EmptyDependencyMap
Definition:
EmptyDependencyMap.php:15
BackgroundTasks\Implementation
Created by PhpStorm.
Definition:
BasicTaskManagerTest.php:9
BackgroundTasks\Implementation\BasicTaskManagerTest\$taskManager
$taskManager
Definition:
BasicTaskManagerTest.php:28
BackgroundTasks\Implementation\BasicTaskManagerTest\setUp
setUp()
Definition:
BasicTaskManagerTest.php:31
MockeryPHPUnitIntegration
ILIAS\DI\Container
Customizing of pimple-DIC for ILIAS.
Definition:
Container.php:17
State
SyncTaskManager
Container
ILIAS\BackgroundTasks\Implementation\TaskManager\SyncTaskManager
Definition:
SyncTaskManager.php:28
MockeryPHPUnitIntegration
ILIAS\BackgroundTasks\Implementation\Bucket\BasicBucket
Definition:
BasicBucket.php:12
PlusJob
BasicBucket
ILIAS\BackgroundTasks\Implementation\Bucket\State\SCHEDULED
const SCHEDULED
Definition:
State.php:11
Injector
BasicPersistence
Vendor\Package\$b
$b
Definition:
example_cleaned.php:31
BasicTaskManager
BackgroundTasks\Implementation\BasicTaskManagerTest\$bucket
$bucket
Definition:
BasicTaskManagerTest.php:29
Vendor\Package\$a
$a
thx to https://mlocati.github.io/php-cs-fixer-configurator for the examples
Definition:
example_cleaned.php:31
$dic
$dic
Definition:
result.php:13
Vendor\Package\$c
$c
Definition:
example_cleaned.php:31
EmptyDependencyMap
DownloadInteger
TestCase
$factory
$factory
Definition:
metadata.php:58
tests
BackgroundTasks
Implementation
BasicTaskManagerTest.php
Generated on Thu Apr 3 2025 20:01:23 for ILIAS by
1.8.13 (using
Doxyfile
)